[llvm-dev] Which are CFI (Control Flow Integrity) related files?

PenYiWang via llvm-dev llvm-dev at lists.llvm.org
Tue Aug 7 19:01:46 PDT 2018


 Hi

I want to trace the code of clang/llvm CFI (Control Flow Integrity)
 mechanism

I found that there is ForwardControlFlowIntegrity.cpp in llvm 3.6

https://github.com/llvm-mirror/llvm/blob/release_36/lib/CodeGen/
ForwardControlFlowIntegrity.cpp

But I don't know which files implement  CFI (Control Flow Integrity)  in
later version

(1)

If I use this command

clang-6.0 -fsanitize=cfi-icall -fvisibility=hidden -flto ./test.c

Which files implement CFI ?

(2)

I found these two files

but I set break point  in gdb , and didn't find anything

(gdb) b llvm::CrossDSOCFI::buildCFICheck

https://github.com/llvm-mirror/llvm/blob/release_60/lib/Transforms/IPO/
LowerTypeTests.cpp
https://github.com/llvm-mirror/llvm/blob/release_60/lib/Transforms/IPO/
CrossDSOCFI.cpp

(3)

What's "MCCFIInstruction" ?

Does it relate to CFI (Control Flow Integrity) ?

http://llvm.org/doxygen/classllvm_1_1MCCFIInstruction.html

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180808/abde9d9a/attachment-0001.html>


More information about the llvm-dev mailing list