This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2 1/3] posix: Remove dynamic memory allocation from execl{e,p}
- From: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- To: Florian Weimer <fweimer at redhat dot com>, Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- Cc: Joseph Myers <joseph at codesourcery dot com>, <libc-alpha at sourceware dot org>, <nd at arm dot com>
- Date: Tue, 2 Feb 2016 12:46:40 +0000
- Subject: Re: [PATCH v2 1/3] posix: Remove dynamic memory allocation from execl{e,p}
- Authentication-results: sourceware.org; auth=none
- Nodisclaimer: True
- References: <1454343665-1706-1-git-send-email-adhemerval dot zanella at linaro dot org> <1454343665-1706-2-git-send-email-adhemerval dot zanella at linaro dot org> <alpine dot DEB dot 2 dot 10 dot 1602011648030 dot 2674 at digraph dot polyomino dot org dot uk> <56AF936C dot 6070907 at linaro dot org> <56B09201 dot 4010502 at redhat dot com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:23
On 02/02/16 11:24, Florian Weimer wrote:
> On 02/01/2016 06:18 PM, Adhemerval Zanella wrote:
>
>> Right, it is not ensuring the safeness. Is '-fstack-check' the suffice
>> option to ensure it or do we need a more strict one?
>
> In my tests, the initial stack banging probe is sometimes more than a
> page away from the current stack pointer, so it does not look safe to me.
i think that can be fixed by
memset(argv, 0, sizeof argv);
even if it clobbers other threads it will hit the guard page eventually.