This is the mail archive of the 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]

Re: [PATCH 2/2][BZ #12416] Use stack boundaries from /proc/PID/mapsto make stack executable

On Mon, May 14, 2012 at 7:46 PM, Roland McGrath <> wrote:
>> So I propose the following simpler patch instead in the interest of
>> marking as less of the stack as possible as executable. The patch
>> modifies pthread_getattr_np to use the page end containing
>> __libc_stack_end as the end of stack and hence return stack_size and
>> stack_end + stack_size as the size and address of stack respectively.
> That sounds reasonable.
>> One other thing I realized when I wrote the test case is that
>> __pthread_attr_getstackaddr simply subtracts stacksize from stackaddr
>> and returns it, which is wrong for architectures with _STACK_GROWS_UP.
>> In fact, pthread_getattr_np also probably has a similar problem. I am
>> currently surrounded by x86 boxes, so I'll see if I find myself an ia64
>> box to confirm this. I'll post patches for those problems separately if
>> they're applicable.
> The only _STACK_GROWS_UP machine is hppa.

I have a *pile* of patches to nptl/ to fix all of this, but I haven't
had time to push them out for review.

If you find  place that needs _STACK_GROWS_UP please mark it with:

# error Not implemented.

Then I'll find that and fix it up for hppa.


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