fix to noexec_user_stack on solaris 2.{6,7}

Rob capveg@cs.umd.edu
Tue Oct 19 15:29:00 GMT 1999


[Initial apologies if this has been dealt with.  I wasn't able
to find a FAQ, and a searches for "noexec" and "user stack" turned 
up nothing]

Hi,

I recently started running my solaris 2.6 boxes with the
noexec_user_stack option that prevents anyone from executing code
off of the data segment of a process.  This is a great security
feature, and has been relatively painless.  I ran into a problem
with the gdb feature "call" and "print proc()", but seem to
have gotten around it by putting:

#define CALL_DUMMY_LOCATION          AT_ENTRY_POINT
#define CALL_DUMMY_ADDRESS()         entry_point_address ()

at the end of gdb-4.18/gdb/config/sparc/tm-sun4sol2.h

So my questions are:
	- has someone already fixed this, and I have a shiny new wheel?
	- is this a proper fix?  I have read only enough of the gdb code
			to get this working...
	- does this break anything else my limited tests
		haven't found?
	- would it be possible/advisable to get a ./configure
		option of "--non-executable-data-stack" to
		enable this?  I know linux has a similar patch
		to turn of the user stack, so this is useful
		for other architectures.

Assuming I am on the right track, I can submit a patch.  I
just wanted to get some sanity checks first :)~

TIA, and for what its worth, gdb is a great program, so thanks!


- Rob
.




More information about the Gdb mailing list