This is the mail archive of the
mailing list for the GCC project.
Re: [patch] gcc fstack-protector-explicit
- From: Marcos DÃaz <marcos dot diaz at tallertechnologies dot com>
- To: Daniel Gutson <daniel dot gutson at tallertechnologies dot com>
- Cc: Jeff Law <law at redhat dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 2 Jul 2014 14:58:37 -0300
- Subject: Re: [patch] gcc fstack-protector-explicit
- Authentication-results: sourceware.org; auth=none
- References: <CAEOtcjmFhFJ8A4r3nLq_odtFSctT51TOma0douMdBb27uKNnVA at mail dot gmail dot com> <528AFE96 dot 3040301 at redhat dot com> <CAEOtcjkX9yk5DXQbrKqxncpZJ0zvVdHq44jpL+6Bub9mH_t=DA at mail dot gmail dot com> <528D09D9 dot 9020902 at redhat dot com> <CAEOtcj=sXsqMOZw6Kas2iK=e6qRh5u+hmwB=-tmqAoWZL==5Dg at mail dot gmail dot com> <53B2EEEC dot 9030003 at redhat dot com> <CAF5HaEXvVgiGc3mexA5HL6ot5j7xObfNtqOgOsui6vTEZV5hGQ at mail dot gmail dot com>
On Tue, Jul 1, 2014 at 6:34 PM, Daniel Gutson
> On Tue, Jul 1, 2014 at 2:25 PM, Jeff Law <firstname.lastname@example.org> wrote:
>> On 03/19/14 08:06, Marcos DÃaz wrote:
>>> Well, finally I have the assignment, could you please review this patch?
>> My first thought was that if we've marked the function with an explicit
>> static protector attribute, then it ought to be protected regardless of any
>> flags. Is there some reason to require the -fstack-protect-explicit?
> They can work separately, since the logic is:
> if NOT stack-protect-explicit
> a function can be protected by the current logic OR it has the attribute
> (a function may be not automatically protected with the current logic)
> ELSE // stack-protect-explicit
> only functions marked with the attribute will be protected.
If there isn't any stack-protect flag (strong, common or explicit) the
attribute has no effect
> IOW, when no stack-protect-explicit, the functions may not be
> protected due to current logic, so the attribute acts as an override
> to request protection.
>> The patch itself is relatively simple and I don't see anything that looks
>> terribly wrong at first glance. I think we just need to make sure we're on
>> the same page WRT needing the -fstack-protect-explicit flag.
> Daniel F. Gutson
> Chief Engineering Officer, SPD
> San Lorenzo 47, 3rd Floor, Office 5
> CÃrdoba, Argentina
> Phone: +54 351 4217888 / +54 351 4218211
> Skype: dgutson
San Lorenzo 47, 3rd Floor, Office 5
Phone: +54 351 4217888 / +54 351 4218211/ +54 351 7617452