Re: [patch 2/5] Add the Kconfig option for the stackprotector feature

Paweł Sikora
2006-07-28T17:14:10Z

On Friday 28 July 2006 18:24, Daniel Walker wrote:
> On Fri, 2006-07-28 at 18:03 +0200, Arjan van de Ven wrote:
> > ---
> > arch/x86_64/Kconfig | 25 +++++++++++++++++++++++++
> > 1 file changed, 25 insertions(+)
>
> Could this be supported on more than just x86_64, it seems fairly
> generic ?

yes, it could.

gcc supports stack protection at so called tree-level (it means
it's architecture-independent). i've just tested a simple userland-code:

#include <stdlib.h>
#include <string.h>
int main()
{
char c;
memset( &c, 0, 512 );
return 0;
}

and stack protection works fine on {ix86,x86-64,powerpc}-linux.
i can test it on {alpha,sparc}-linux later but i'm pretty sure
it'll work too on these archs.