>Looks to me like >http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/threads/thr.c > >checks sysconf(_SC_STACK_PROT) and honors it. The only problem is >that it caches the return value (static variable stackprot), which >would have to be invalidated by the mprotect() wrapper when the magic >ADDR_STACK was used (so that it would pick up the new process-wide >value that was also set in the proc structure). That would make that >setting apply to all future thread stacks. > >In other words, that source file would have to add a _-prefixed library >internal function that zeros stackprot. > >Maybe the best one can do is the main stack (current+future) and >the thread stacks (future), if one can't readily figure out from >either user space (syscall wrapper check) or kernel space the location >and size of all the current thread stacks. > >I haven't looked at how sigaltstack() handling might get involved...
It's created by the application and so it's either rwx (32 bit or sparc) or rw- on amd64 unless they created it differently. (The differences are part of history and part of the implementation [PLT tables are instructions on SPARC but are data on x86]) Casper _______________________________________________ opensolaris-discuss mailing list opensolaris-discuss@opensolaris.org