https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81715

--- Comment #8 from Arnd Bergmann <arnd at linaro dot org> ---
(In reply to Martin Liška from comment #7)
> Ok, I'm quite opened for changes that will make smaller red zones for
> smaller variables. However, in case of sanitization-aware inlining, it's
> probably too complicated and I would rather use no_inline attribute on
> places where needed.

Ok, makes sense.

What do you think of a possible optimization of the way that the stack
variables get allocated (regardless of asan-stack), to allow gcc to reuse the
stack locations for multiple instances of inlining the same function? I guess
we don't want to do that for -fsanitize-address-use-after-scope, but for all
other cases it sounds like a useful optimization that would drastically reduce
the frame size of nl80211_send_wiphy() and many other functions.
When I looked at this in the past, I found that clang does this more often than
gcc already, and it did not seem to be impacted by enabling or disabling
-fsanitize=kernel-address or asan-stack=1.

Reply via email to