[PATCH] D84419: Fix interaction between stack alignment and inline-asm stack clash protection

serge via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 2 07:12:04 PDT 2020


serge-sans-paille updated this revision to Diff 289439.
serge-sans-paille added a comment.

Take into account @cuviper review, split handling of alignment between three cases:

1. small stack, small align → adjust first stack increase
2. large stack, small align → perform a first stack increase + touch before the loop
3. large align → perform a loop over the range between original stack pointer and aligned stack pointer (in that case, there's still a small window for the attack)

I still need to improve the third case...


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84419/new/

https://reviews.llvm.org/D84419

Files:
  llvm/lib/Target/X86/X86FrameLowering.cpp
  llvm/lib/Target/X86/X86FrameLowering.h
  llvm/test/CodeGen/X86/stack-clash-no-free-probe.ll
  llvm/test/CodeGen/X86/stack-clash-small-alloc-medium-align.ll
  llvm/test/CodeGen/X86/stack-clash-small-large-align.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84419.289439.patch
Type: text/x-patch
Size: 16753 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200902/2b4e82d9/attachment.bin>


More information about the llvm-commits mailing list