Re: Compiler alternatives to no-exec (was Re: non exec stack...)

Marcin Dalecki (dalecki@cs.net.pl)
Mon, 10 Aug 1998 10:33:41 -0700 (MST)


On 7 Aug 1998 06:20:07 GMT, Linus Torvalds (torvalds@transmeta.com) wrote:
>There's an even simpler fix, with the compiler just pushing 0 on entry
>to all functions, and on exit it pops it off and aborts if it is
>non-zero.
>
>If somebody is using a overlong string, it cannot contain an all-zero
>value in the middle, so nobody can use the standard string overflow
>trick.
>
>Zero also happens to be very cheap to test against. Total overhead: four
>instructions per function

And what about an optional warning in the compiler which would you inform
about all uses of hardcoded array bounds? This would incure at least no
cost in the executable at all and make the fixing of the offending broken
apps just a breeze... Maybe someone on egcs with some spare time should
consider this seriously?

Marcin
=========================================================================
In real life: System Programmer at AIS AXON GmbH

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html