[PATCH] Add Forward-Edge Control-Flow Integrity support

Tom Roeder tmroeder at google.com
Fri Jun 27 14:58:58 PDT 2014


This update to forward-edge control-flow integrity changes the jump-table-all flag to fcfi and uses it to set the JumpTableAll flag in JumpInstrTables. This also makes the FCFI pass optional based on the setting of TargetOptions.FCFI, which is controlled by the fcfi flag.

This change also removes the .globl attribute from jumptable entries and from the generated __llvm_cfi_pointer_warning function. This prevents symbol conflicts between two objects compiled with FCFI.

http://reviews.llvm.org/D4167

Files:
  include/llvm/CodeGen/CommandFlags.h
  include/llvm/CodeGen/ForwardControlFlowIntegrity.h
  include/llvm/CodeGen/JumpInstrTables.h
  include/llvm/CodeGen/Passes.h
  include/llvm/InitializePasses.h
  include/llvm/Target/TargetOptions.h
  lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  lib/CodeGen/CMakeLists.txt
  lib/CodeGen/ForwardControlFlowIntegrity.cpp
  lib/CodeGen/JumpInstrTables.cpp
  lib/CodeGen/LLVMTargetMachine.cpp
  lib/CodeGen/TargetOptionsImpl.cpp
  test/CodeGen/ARM/jump_tables.ll
  test/CodeGen/X86/cfi_enforcing.ll
  test/CodeGen/X86/cfi_non_default_function.ll
  test/CodeGen/X86/cfi_simple_indirect_call.ll
  test/CodeGen/X86/jump_table_alias.ll
  test/CodeGen/X86/jump_table_bitcast.ll
  test/CodeGen/X86/jump_tables.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4167.10947.patch
Type: text/x-patch
Size: 50473 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140627/88308f65/attachment.bin>


More information about the llvm-commits mailing list