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] [day] [month] [year] [list]
Date:	Thu, 21 Jul 2011 15:03:38 +0200
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	"H. Peter Anvin" <hpa@...or.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Jason Wessel <jason.wessel@...driver.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Prasad <prasad@...ux.vnet.ibm.com>,
	Will Deacon <will.deacon@....com>,
	Paul Mundt <lethal@...ux-sh.org>
Subject: Re: [PATCH 3/6] x86: Allow the user not to build hw_breakpoints

On Thu, Jul 21, 2011 at 09:26:56AM +0200, Ingo Molnar wrote:
> 
> * H. Peter Anvin <hpa@...or.com> wrote:
> 
> > On 07/14/2011 08:03 AM, Frederic Weisbecker wrote:
> > > So that hw_breakpoints and perf can be not built on
> > > specific embedded systems.
> > 
> > I want to emphasize I am very, very unhappy about this.  It should 
> > be possible to not build perf while still have breakpoints 
> > available... breakpoints are way more important than perf.
> 
> What we could indeed do is to separate out a 'core perf' portion that 
> is necessary for hw-breakpoints to work fine, thus allowing for 
> example the PMU drivers to be disabled.

That would still require a big chunk of perf.

> 
> Otherwise we have expressed hw breakpoint APIs via perf events and 
> that model is working well. Making hw-breakpoints a separate 
> subsystem again with isolated (and partly duplicated) infrastructure 
> would be a step back really.

I actually don't think it's working well. What we have with the current
design is the dependency to perf as a big midlayer that is apparently
convenient but actually induce some nasty things.

Just look how we need those ptrace_get_breakpoints() protection to deal
with perf exit path implementation for example. Or the need for archs
to translate arch ptrace breakpoint info into generic perf attrs.

I think we had to try the current design just to see if that could plug
nicely. But now that we have this for several releases, I can only conclude
that we should revert back to the design Prasad proposed, consisting in
having breakpoints a service used by perf but not the opposite.

For ptrace, all it takes is a generic hook in the preempt notifiers to
activate/deactivate breakpoints. I much prefer that to a big dependency
on a perf core midlayer.
--
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