KCFI machine function passes transform indirect calls with a
cfi-type attribute into architecture-specific type checks bundled
together with the calls. Instead of having a separate pass for each
architecture, add a generic machine function pass for KCFI and
move the architecture-specific code that emits the actual check to
TargetLowering. This avoids unnecessary duplication and makes it
easier to add KCFI support to other architectures.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Thanks for the patch! Nice refactoring.
llvm/include/llvm/LinkAllPasses.h | ||
---|---|---|
96 | fix indentation |
llvm/lib/CodeGen/KCFI.cpp | ||
---|---|---|
9 | It is KFCI everywhere. At least in one place it should be explained what these four magical letters mean. |
llvm/lib/CodeGen/KCFI.cpp | ||
---|---|---|
9 | CFI here means Control-flow integrity. This is an implementation that is dedicated to the Linux kernel (I need to do some homework that why this has a lot to do with codegen.) |
llvm/lib/CodeGen/KCFI.cpp | ||
---|---|---|
9 | Thanks. I'll check out the blog post, too (nice blog btw, very informative). |
llvm/lib/CodeGen/KCFI.cpp | ||
---|---|---|
9 | Good point. I'll expand this comment in a follow-up patch. |
llvm/lib/CodeGen/KCFI.cpp | ||
---|---|---|
9 |
llvm/lib/CodeGen/KCFI.cpp | ||
---|---|---|
9 | Awesome, thank you |
fix indentation