lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 14 Nov 2008 22:10:35 +0100
From:	"stephane eranian" <eranian@...glemail.com>
To:	"Metzger, Markus T" <markus.t.metzger@...el.com>
Cc:	"Ingo Molnar" <mingo@...e.hu>, "Andi Kleen" <andi@...stfloor.org>,
	"Andrew Morton" <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org,
	"Markus Metzger" <markus.t.metzger@...glemail.com>
Subject: Re: debugctl msr

Markus,


I am trying another approach for connecting perfmon to ds.c. I have
added new callbacks
to perfmon to allow me to invoke ds_request_pebs, once I know the
target thread or CPU.
That seems to work, however I ran into a spinlock problem is ds_request():

static int ds_request(struct task_struct *task, void *base, size_t size,
                      ds_ovfl_callback_t ovfl, enum ds_qualifier qual)
{
        struct ds_context *context;
        unsigned long buffer, adj;
        const unsigned long alignment = (1 << 3);
        int error = 0;

        if (!ds_cfg.sizeof_ds)
                return -EOPNOTSUPP;

        /* we require some space to do alignment adjustments below */
        if (size < (alignment + ds_cfg.sizeof_rec[qual]))
                return -EINVAL;

        /* buffer overflow notification is not yet implemented */
        if (ovfl)
                return -EOPNOTSUPP;


        spin_lock(&ds_lock);

>>        if (!check_tracer(task))
>>                return -EPERM;

You need to spin_unlock() before returning here!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ