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: <20120427202701.GA5949@merkur.ravnborg.org>
Date:	Fri, 27 Apr 2012 22:27:01 +0200
From:	Sam Ravnborg <sam@...nborg.org>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	linux-kbuild <linux-kbuild@...r.kernel.org>,
	Michal Marek <mmarek@...e.cz>,
	"H. Peter Anvin" <hpa@...ux.intel.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Andi Kleen <andi@...stfloor.org>, Ingo Molnar <mingo@...e.hu>,
	Frederic Weisbecker <fweisbec@...il.com>
Subject: Re: RFC: How to handle function tracing, frame pointers and
	-mfentry?

On Fri, Apr 27, 2012 at 02:46:39PM -0400, Steven Rostedt wrote:
> I have code that implements -mfentry for the function tracer.
> 
> For those that are unfamiliar with this, it was introduced into gcc in
> 4.6.0 for x86 only. Used with the -pg option, it replaces mcount with
> fentry, and is placed at the first instruction of a function (instead of
> after the frame has been built, as mcount does).
> 
> So what's my problem?  With -mfentry, function tracer does not depend on
> frame pointers. As frame pointers may add overhead, some distros
> (Debian) has disabled frame pointers from their kernels and with that,
> has also disabled function tracing.
> 
> Currently, function tracing selects CONFIG_FRAME_POINTER for various
> archs (including x86), as the kernel will not compile without it, if
> function tracing is enabled. But if -mfentry is available with the
> compiler, it does not have this dependency. The kernel will compile fine
> with -pg -mfentry and without frame pointers.
> 
> My question is, how do I remove the dependency in kconfig based on the
> compiler?

Allow the user to select one of:
1) function tracer
2) frame pointer
3) none of the above

This should be trivial to do in Kconfig language.

If "function tracer" is selected then use -mfentry if supported,
with a fallback to frame pointers.

This looks simple IMO and should be easy to implement too.

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