Subject: Re: ssp and gcc-4.1
To: None <>
From: Christos Zoulas <>
List: tech-userlevel
Date: 11/07/2006 18:27:47
In article <>,
Jason Thorpe  <> wrote:
>On Nov 7, 2006, at 10:14 AM, Christos Zoulas wrote:
>> It is just telling you it will not be able to stack-protect those
>> functions.
>Ok, rather than adding a warning flag that applies to the entire file,  
>I'd much rather see a new function attribute --  
>__attribute__((__no_stack_protect__)) perhaps? -- so that we can  
>pinpoint which functions we want to suppress the warning on.
>Yes, this means compiler work, but I think it's a better solution  
>overall.  I don't think it's a great idea to mandate "no alloca() or  
>variable array allocations in the kernel", especially if we have a  
>long-term goal of providing ABI stability in the kernel.

I am in total agreement. I was just avoiding "the compiler work",
and saying that turning off the warning on particular source files
has the same effect, while not requiring modifications to the compiler.
Of course it is not as good as having the attribute, because then
other functions might sneak in to that compilation unit that you did
not intend for them to have the attribute automatically applied to them.