⚙ D68720 Support -fstack-clash-protection for x86
- Added on 2023-09-11
- Page: https://reviews.llvm.org/D68720
- See on Internet Archive
- #llvm #security #stack-clash
Implement protection against the stack clash attack [0] through inline stack probing.
Probe stack allocation every PAGE_SIZE during frame lowering or dynamic allocation to make sure the page guard, if any, is touched when touching the stack, in a similar manner to GCC[1].
This extends the existing probe-stack mechanism with a special value inline-asm. Technically the former uses function call before stack allocation while this patch provides inlined stack probes and chunk allocation.
Only implemented for x86.