[LinuxBIOS] Infamous __stack_chk_fail problem.

Jordan Crouse jordan.crouse at amd.com
Mon Dec 3 21:19:30 CET 2007

On 03/12/07 11:29 -0800, Steve Isaacs wrote:
> On Mon, 2007-12-03 at 11:52 -0700, Jordan Crouse wrote:
> > I'm already on board with my opinion on a cross compiler, no need to rehash
> > that here.
> > 
> > But the thing about _this_ bug is that this can be fixed, and if you use
> > buildrom it _should_ be fixed.  This is our fault, and we need to remedy it
> > immediately.  What platform are you trying to build for?
> > 
> I'm working on an adaptation for a board of our design using a chipset
> not currently supported by LinuxBIOS. I say "currently" because one
> reason I'm participating in this forum is so the work I do can be
> submitted back to the project meaning the chips I add can one day become
> part of the LinuxBIOS source set.

Depending on which Config.lb you based your code on, you might
be happy or sad.  In buildrom, we "fix" the stack problem by passing in
-fno-stack-protector through the CPU_OPT environment variable, which then
gets included in the make rules.  But we have found that on some platforms.
CPU_OPT isn't used by every rule, and we've been trying to fix those as
they happen.  The problem is that LinuxBIOS compiler arguments are pretty
long, and its a pain to go through them all to figure out which files
don't have -fno-stack-protector attached to them.  The best way to do it
is to figure out which files are the offenders (either through the linker
logs or by running nm on all the .o files and looking for the stack
protector symbol) and find the rules and fix them. 

Jordan Crouse
Systems Software Development Engineer 
Advanced Micro Devices, Inc.

More information about the coreboot mailing list