[PATCH] Implement Control Flow Integrity for virtual calls.

Peter Collingbourne peter at pcc.me.uk
Wed Feb 4 18:47:31 PST 2015


Hi jfb, kcc, silvas,

This patch introduces the -fsanitize=cfi-vptr flag, which enables a control
flow integrity scheme that checks that virtual calls take place using a vptr of
the correct dynamic type. More details in the new docs/ControlFlowIntegrity.rst
file.

It also introduces the -fsanitize=cfi flag, which is currently a synonym for
-fsanitize=cfi-vptr, but will eventually cover all CFI checks implemented
in Clang.

This uses the bitset mechanism currently under review at
http://reviews.llvm.org/D7288

http://reviews.llvm.org/D7424

Files:
  docs/ControlFlowIntegrity.rst
  docs/UsersManual.rst
  docs/index.rst
  include/clang/AST/Mangle.h
  include/clang/Basic/Sanitizers.def
  include/clang/Driver/Driver.h
  include/clang/Driver/SanitizerArgs.h
  lib/AST/ItaniumMangle.cpp
  lib/AST/MicrosoftMangle.cpp
  lib/CodeGen/CGClass.cpp
  lib/CodeGen/CGVTables.cpp
  lib/CodeGen/CodeGenFunction.h
  lib/CodeGen/CodeGenModule.h
  lib/CodeGen/ItaniumCXXABI.cpp
  lib/Driver/Driver.cpp
  lib/Driver/SanitizerArgs.cpp
  lib/Driver/Tools.cpp
  test/CodeGenCXX/cfi-vptr.cpp
  test/Driver/fsanitize.c

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7424.19374.patch
Type: text/x-patch
Size: 22077 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150205/2c3cf5ee/attachment.bin>


More information about the cfe-commits mailing list