wg-best-practices-os-developers
wg-best-practices-os-developers copied to clipboard
split-stack feature on GCC and clang compiler
GCC and clang compiler offer feature to allocate discontinuous stack when running out of stack memory. The -fsplit-stack
option activates this behavior on GCC (https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-fsplit-stack / https://gcc.gnu.org/wiki/SplitStacks) and clang (https://llvm.org/docs/SegmentedStacks.html).
This option can mitigate some stack exhaustion issues.
Do you think this option may have its place on "Compiler Hardening Guide"?
Regards,
Information about security benefits of split-stack
option can be found on a article from Red-Hat website : https://developers.redhat.com/articles/2022/06/02/use-compiler-flags-stack-protection-gcc-and-clang#
We have the chance to have one of the two authors, @siddhesh, already contributing to the guide. Maybe this option was already discussed.
Regards,
Has this been addressed by the C/C++ Compiler Hardening options guide? @gkunz @thomasnyman @david-a-wheeler