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]
Message-ID: <20110711210753.GA3582@e102144-lin.cambridge.arm.com>
Date:	Mon, 11 Jul 2011 22:07:53 +0100
From:	Will Deacon <will.deacon@....com>
To:	Frederic Weisbecker <fweisbec@...il.com>
Cc:	Avi Kivity <avi@...hat.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
	Ingo Molnar <mingo@...e.hu>,
	"a.p.zijlstra@...llo.nl" <a.p.zijlstra@...llo.nl>,
	"acme@...stprotocols.net" <acme@...stprotocols.net>,
	Jason Wessel <jason.wessel@...driver.com>
Subject: Re: [PATCH 1/3] perf: add context field to perf_event

On Mon, Jul 04, 2011 at 03:36:57PM +0100, Frederic Weisbecker wrote:
> On Mon, Jul 04, 2011 at 05:10:20PM +0300, Avi Kivity wrote:
> > On 07/04/2011 04:58 PM, Frederic Weisbecker wrote:
> > >Another thing I would like to do in the even longer term is to not use perf anymore
> > >for ptrace breakpoints, because that involves a heavy dependency and few people are
> > >happy with that. Instead we should just have a generic hook into the sched_switch()
> > >and handle pure ptrace breakpoints there. The central breakpoint API would still be
> > >there to reserve/schedule breakpoint resources between ptrace and perf.
> > >
> > 
> > 'struct preempt_notifier' may be the hook you're looking for.
> 
> Yeah looks like a perfect fit as it's per task.

I had a quick look at this and I think the preempt_notifier stuff needs
slightly extending so that we can register a notifier for a task other than
current [e.g. the child of current on which we are installing breakpoints].

If the task in question is running, it looks like this will introduce a race
condition between notifier registration and rescheduling. For the purposes
of ptrace this shouldn't be a problem as the child will be stopped, but
others might also want to make use of the new functionality.

Any ideas on how this could be achieved, or am I better off just restricting
this to children that are being traced?

Cheers,

Will
--
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