Re: Unnecessary overhead with stack protector.

Eric Sandeen
2009-10-21T19:24:58Z

Eric Sandeen wrote:
> Eric Sandeen wrote:

..

> but maybe more to Dave's original point, xfs on x86_64 in my tree had
> 243 functions with minimal stack usage of 8 bytes. w/
> CC_STACKPROTECTOR_ALL in force, I end up with these sizes for those
> functions:
>
> count bytes
> 3 16
> 236 24
> 1 32
> 5 40
>
> 8->24 bytes is pretty significant too, w/ a 200% increase, if you add a
> few up...

And on top of that (sorry for the self-replies) there are 600+ functions
in xfs that didn't even register a stack footprint at all (i.e. no sub
%rsp in disassembly) w/o stackprotector, which now have 16 or 24 bytes
with it on.

Forgive me if I'm not using the right tools to look, but it seems to me
that in the aggregate, CC_STACKPROTECTOR_ALL has a pretty big impact.

-Eric