[PATCH] D75935: Add RET-hardening Support to X86 to mitigate Load Value Injection (LVI) [3/6]
Matthew Riley via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 9 17:26:19 PDT 2020
mattdr added inline comments.
================
Comment at: llvm/lib/Target/X86/X86LoadValueInjectionRetHardening.cpp:82-83
+
+ // We can clobber any register allowed by the function's calling convention.
+ for (const MCPhysReg *PR = TRI->getCalleeSavedRegs(&MF); auto Reg = *PR; ++PR)
+ UnclobberableGR64s.set(Reg);
----------------
Does the LLVM optimizer ever invent "custom" calling conventions for nonpublished symbols? Sort of like what's described here: https://devblogs.microsoft.com/oldnewthing/20150128-00/?p=44813
If it does, the assumption here that we can rely on the architecture's calling convention might not hold.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75935/new/
https://reviews.llvm.org/D75935
More information about the llvm-commits
mailing list