This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PING: [PATCH 2/2 Take-2][BZ #12416] Use stack boundaries from/proc/PID/maps to make stack executable


ping?

On Fri, 27 Apr 2012 08:42:58 +0530, Siddhesh wrote:

> On Wed, 25 Apr 2012 13:34:24 -0700 (PDT), Roland wrote:
> > Perhaps it should work in a different way.  It's nasty to
> > require /proc access, and all the io plus stdio overhead et al might
> > make it more costly than another method.  It could use something
> > like the mprotect-probing technique to locate the hole below the
> > stack that linux/dl-execstack.c uses when PROT_GROWSDOWN is not
> > available.
> 
> I have written a new patch based on this idea. I have consolidated the
> mprotect-probing code into a function to make the code a bit cleaner,
> since the same logic is being used repeatedly. I have also updated the
> test case to not use procfs and use pthread_getattr_np instead. I have
> verified (on x86_64) the test case with and without this fix. I have
> also verified that there are no regressions in the testsuite due to
> this fix.
> 
> Regards,
> Siddhesh
> 
> ChangeLog:
> 
> 2012-04-27  Siddhesh Poyarekar  <siddhesh@redhat.com>
> 
> 	[BZ #12416]
> 	Based on idea by Roland McGrath.
> 	* elf/tst-execstack.c (do_test): Check that pthread_getattr_np
> 	returns the same end of stack before and after stack is made
> 	executable.
> 	* sysdeps/unix/sysv/linux/dl-execstack.c
> 	(_dl_make_stack_executable): Also mark pages below (or above
> if _STACK_GROWS_UP) as executable. Consolidate code to
> 	incrementally mark stack executable to ...
> 	(_incremental_make_stack_executable): ... a new function.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]