On Mon, Mar 14, 2005 at 08:34:32AM +0100, ?yvind Harboe wrote: > > > - Lately e.g. the AMD CPU has added support for making it impossible > > > to execute code on the stack. The town isn't big enough for > > > both stack based trampolines and stack code execution protection. > > > What happens now? > > > > Usually it is possible to disable this stack protection. If it is not > > possible, then that's a very serious limitation.
But OpenBSD either ignores it or gcc doesn't set the stack executable on OpenBSD. At least my trampoline example (http://www.clifford.at/cfun/gccfeat/gccfeat01.c) segfaults on OpenBSD when trying to execute the trampoline code.. > I believe e.g. Windows XP service pack 2 has this protection enabled. I don't think so. Afaik even an Opteron (and the compatibles) only have an extra "execute" page permission when running 64 bit programs. It doesn't change anything for 32 bit binaries. There is a pentium CPU register which contains the highest executeabe address. But using it "the right way" would require rebuilding all apps so all executeable adrresses are in the lower half of the virtual memory and all data in the upper half. This couldn't be done with a simple change in the operating system.... (unless there really aren't any executeable addresses above the stack frame - then it could be done for the stack but not for all other data segments). yours, - clifford -- | Clifford Wolf /-----=[ www.clifford.at ]==[ Tel: +43-699-10063494 ]=-\ |--------------/ www.cngw.org - www.ccc.de =[ Fax: +43-2235-42788-4 ]=-| |-=[ EDEN Creations -- www.edenevents.at ]==[ IRC: www.freenode.net ]=-| \==[ www.rocklinux.org ]===[ www.rocklinux.net ]===[ www.linbit.com ]==/ When your hammer is C++, everything begins to look like a thumb.
pgptMvLNXPaWo.pgp
Description: PGP signature