Re: [announce] [patch] NX (No eXecute) support for x86, 2.6.7-rc2-bk2

From: Arjan van de Ven
Date: Fri Jun 04 2004 - 13:15:06 EST


On Fri, Jun 04, 2004 at 02:11:00PM -0400, Gerhard Mack wrote:
> On Fri, 4 Jun 2004, Arjan van de Ven wrote:
>
> > I know that in a FC1 full install there are less than 5 binaries that don't
> > run with NX. (one uses nested functions in C and passes function pointers to
> > the inner function around which causes gcc to emit a stack trampoline, and
> > gcc then marks the binary as non-NX, the others have asm in them that we
> > didn't fix in time to be properly marked).
>
> Can you tell if GCC uses trampolines for all use of function pointers or
> just ones that use nested functions ?

just for nested functions

>
> Also, what is the fastest way to check if GCC is marking non-NX?

readelf -l <binary>

should give output with a STACK line, if that says "RW" then it's NX ok, if
it says "RWX" then it's non-NX

Attachment: pgp00000.pgp
Description: PGP signature