lkml.org 
[lkml]   [1998]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Compiler alternatives to no-exec (was Re: non exec stack...)
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

\
 
 \ /
  Last update: 2005-03-22 13:43    [from the cache]
©2003-2011 Jasper Spaans