[PATCH] Add Forward-Edge Control-Flow Integrity support
JF Bastien
jfb at chromium.org
Sun Oct 26 14:46:59 PDT 2014
Looks good overall.
================
Comment at: include/llvm/CodeGen/ForwardControlFlowIntegrity.h:45
@@ +44,3 @@
+ bool CFIEnforcing, std::string CFIFuncName);
+ virtual ~ForwardControlFlowIntegrity();
+
----------------
`override`
================
Comment at: include/llvm/CodeGen/ForwardControlFlowIntegrity.h:67
@@ +66,3 @@
+ /// for the table
+ typedef DenseMap<FunctionType *, struct CFIConstants> CFITables;
+
----------------
You can drop `struct` here.
================
Comment at: test/CodeGen/X86/cfi_enforcing.ll:1
@@ +1,2 @@
+; RUN: llc -fcfi -cfi-enforcing <%s | FileCheck %s
+
----------------
Could you test x86-32 as well here? No triple below, pass it to the command line instead.
================
Comment at: test/CodeGen/X86/cfi_enforcing.ll:14
@@ +13,3 @@
+; CHECK-NOT: callq __llvm_cfi_pointer_warning
+; CHECK: callq *%r
+ ret i32 0
----------------
Add the registers here, to make sure the masks are on the right thing. You can use FileCheck's capture capabilities to avoid hard-coding the register.
================
Comment at: test/CodeGen/X86/cfi_enforcing.ll:27
@@ +26,3 @@
+}
+; XFAIL: win32
+
----------------
Could you explain why?
http://reviews.llvm.org/D4167
More information about the llvm-commits
mailing list