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:	Tue, 5 May 2009 09:56:02 +0200
From:	Segher Boessenkool <segher@...nel.crashing.org>
To:	Steven Rostedt <srostedt@...hat.com>
Cc:	Anton Vorontsov <avorontsov@...mvista.com>,
	Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org,
	linuxppc-dev@...abs.org, Paul Mackerras <paulus@...ba.org>,
	Sam Ravnborg <sam@...nborg.org>
Subject: Re: [PATCH 1/3] powerpc, Makefile: Make it possible to safely select CONFIG_FRAME_POINTER

> Yeah, I agree. This needs a better description. I only know what's  
> going
> on because I was there for the start of the discussion.
>
> But just to be sure, this is what I think is happening.
>
> When we add "-pg" to gcc, it automatically causes frame pointers to be
> used.

Nope, it does no such thing.

> But with PPC, it always has frame pointers and there's no problem.

Well, what do you call a "frame pointer"?  In the general meaning
of "some register that points to the incoming function arguments
and the function local variables", PowerPC can _usually_ use GPR1,
the stack pointer (and indeed it is called "stack frame pointer"
in the ABI).  In the more narrow meaning of "what GCC calls the
frame pointer", "the thing that -fomit-frame-pointer optimises
away" -- on PowerPC (and many other targets), -fomit-frame-pointer
is the *default* when optimisation is enabled!

There is a GCC bug here though: it won't allow both -pg and
-fomit-frame-pointer be set at the command line at the same time,
even on targets where that is not problematic.

> But with Linux, when you add CONFIG_FRAME_POINTER, it automatically
> adds:  -fno-omit-frame-pointer. Thus the config will add
> "-fomit-frame-pointer" when CONFIG_FRAME_POINTER is not set, or it  
> will
> add "-fno-omit-frame-pointer" when it is set.
>
> The problem with PPC is that "-fno-omit-frame-pointer" is buggy and
> causes gcc to produce bad code.

It's a deeper problem that is only _exposed_ by -fno-o-f-p (and can be
hidden by -mno-sched-epilog in the one spot where it hit us).

> Perhaps a better name would be:
>
> HAVE_FRAME_POINTER_AS_DEFAULT

NO_NO_OMIT_FRAME_POINTER ?  Or better, just never use -fno-o-f-p,
I don't see why you would ever need it.


Segher

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