How to make stack executable on demand?

From: H. J. Lu
Date: Fri Apr 16 2004 - 12:11:17 EST


With the non-executable stack kernel, how can I make stack executable
on demand? If I set kernel with non-executable stack, only those
binaries marked with executable PT_GNU_STACK will have executable
stack. But a binary with non-executable PT_GNU_STACK may dlopen a
DSO with executable PT_GNU_STACK. The dynamic linker will try to
make stack executable with mprotect. But it will either fail if
kernel is set with non-executable stack, or be a no-op if kernel
is set with executable stack. Is there a third option that a process
starts with non-executable stack and can change the stack permission
later?



H.J.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/