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, 27 Apr 2012 17:27:34 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	"H. Peter Anvin" <hpa@...ux.intel.com>
Cc:	Sam Ravnborg <sam@...nborg.org>,
	LKML <linux-kernel@...r.kernel.org>,
	linux-kbuild <linux-kbuild@...r.kernel.org>,
	Michal Marek <mmarek@...e.cz>,
	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, 2012-04-27 at 14:11 -0700, H. Peter Anvin wrote:
> On 04/27/2012 01:57 PM, Steven Rostedt wrote:
> >>
> >> Except it is the wrong thing.  This is not the only user of frame
> >> pointer.  What I think you mean is remove the dependency in Kconfig, but
> >> force the frame pointer enabled if -mfentry is not supported.
> > 
> > You mean option 3?
> > 
> > 3) Add frame pointers silently if gcc fails to build with gcc -pg.
> > 
> 
> Yes, your option 3.
> 

Actually, I just noticed this in the Makefile:

ifdef CONFIG_FRAME_POINTER
KBUILD_CFLAGS   += -fno-omit-frame-pointer -fno-optimize-sibling-calls
else
# Some targets (ARM with Thumb2, for example), can't be built with frame
# pointers.  For those, we don't have FUNCTION_TRACER automatically
# select FRAME_POINTER.  However, FUNCTION_TRACER adds -pg, and this is
# incompatible with -fomit-frame-pointer with current GCC, so we don't use
# -fomit-frame-pointer with FUNCTION_TRACER.
ifndef CONFIG_FUNCTION_TRACER
KBUILD_CFLAGS   += -fomit-frame-pointer
endif
endif


Because of ARM thumb2, -fomit-frame-pointer is not added if
CONFIG_FRAME_POINTER is not set and FUNCTION_TRACER is. As it is fine to
just use '-pg', which gcc will add frame pointers if needed, and it is
only a problem if both -pg and -fomit-frame-pointer is set. We only need
to remove the select without doing anything else.

If -mfentry is added with -pg, and -fno-omit-frame-pointer is not set,
gcc will not add frame pointers by default.

So it seems that gcc took care of this problem for me :-)

I'll go and make a patch that simply removes the select.

Sorry for the noise ;-)

-- Steve


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