lkml.org 
[lkml]   [1999]   [Dec]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Unexecutable stack
Date
From
> Could the designer of the non-executable-stack code please explain how
> this works on an ix86 machine? The ix86 can't differentiate
> between read and execute in hardware. This means that either the
> patch for ix86 is a no-op or, (I shudder), a trap is executed on
> every user stack access, and the kernel code does a comparison.

Or the author is smart.. which is the case. The patch changes the ring 3
code segment descriptor to limit below the stack. Executing code on the stack
traps via a trampoline detector. It works rather nicely considering the limits
the CPU imposes.

On sane machines the kernel does not need to be involved - you can do non
executable stack simply by fixing ld.so and glibc a little on many platforms




-
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.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.038 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site