This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH 2/2 Take-2][BZ #12416] Use stack boundaries from/proc/PID/maps to make stack executable
- From: Siddhesh Poyarekar <siddhesh at redhat dot com>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Sat, 5 May 2012 08:27:30 +0530
- Subject: Re: [PATCH 2/2 Take-2][BZ #12416] Use stack boundaries from/proc/PID/maps to make stack executable
- References: <20120419120021.4780e8c8@spoyarek><20120425203424.A744A2C0CA@topped-with-meat.com><20120427084258.02317347@spoyarek><20120504230845.0AF402C093@topped-with-meat.com>
On Fri, 4 May 2012 16:08:45 -0700 (PDT), Roland wrote:
> > + old_stack_addr += stack_size;
> That looks like it's assuming the stack grows down. I think your
> actual intent is just to verify that both the address and size were
> the same in both calls. But you're not doing that, you're only
> verifying the sum. Why not just save both values and check them both
> If your intent is something subtler than that, then it needs comments.
Thanks for the review. My intent is to check if the bottom of stack
changes, since it is possible that the stack vma may have grown between
the two calls and hence the top of stack (which is computed and
returned as bottom - size) may have changed.