Commit Graph

15 Commits

Author SHA1 Message Date
Peter Collingbourne e878bfeb40 Introduce the VTable interleaving scheme to the CFI design documentation
Dimitar et. al. in [1] proposed a novel VTable layout scheme that enables efficient implementation of virtual call CFI.

This patch adds an introduction of this scheme to the CFI design documentation.

[1] Protecting C++ Dynamic Dispatch Through VTable Interleaving. Dimitar Bounov, Rami Gökhan Kıcı, Sorin Lerner. https://cseweb.ucsd.edu/~lerner/papers/ivtbl-ndss16.pdf

Patch by Zhaomo Yang!

Differential Revision: https://reviews.llvm.org/D50372

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@341989 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-11 20:43:52 +00:00
Vlad Tsyrklevich 2c146e5703 Fix broken links to the Itanium CXX ABI
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@312986 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-12 00:21:17 +00:00
Evgeniy Stepanov a903edb88c Update Cross-DSO CFI documentation.
Reviewers: pcc

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D35094

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307341 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 00:48:12 +00:00
Kostya Serebryany f4da251f87 Proposal: Backward-edge CFI for return statements (RCFI)
Summary: Proposal: Backward-edge CFI for return statements (RCFI)

Reviewers: pcc, eugenis, krasin

Reviewed By: eugenis

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D31112

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298303 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-20 20:42:00 +00:00
Sylvestre Ledru 3a67b12cd7 fix a few typo in the doc but also in the clang messages
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@292015 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-14 11:41:45 +00:00
Kostya Serebryany 30858cad27 Document potential implementation of CFI in hardware.
Summary: Document potential implementation of CFI in hardware.

Reviewers: eugenis, pcc

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D25455

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284029 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 18:33:54 +00:00
Peter Collingbourne 3400678c4b CodeGen: Update Clang to use the new type metadata.
Differential Revision: http://reviews.llvm.org/D21054

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@273730 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-24 21:21:46 +00:00
Evgeniy Stepanov 3a8ad7e2f6 Cross-DSO control flow integrity (Clang part).
Clang-side cross-DSO CFI.

* Adds a command line flag -f[no-]sanitize-cfi-cross-dso.
* Links a runtime library when enabled.
* Emits __cfi_slowpath calls is bitset test fails.
* Emits extra hash-based bitsets for external CFI checks.
* Sets a module flag to enable __cfi_check generation during LTO.

This mode does not yet support diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@255694 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-15 23:00:20 +00:00
Peter Collingbourne 2f3ff4374a docs: Add design documentation for forward-edge CFI for indirect calls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254464 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-01 21:58:54 +00:00
Peter Collingbourne f29b6351df CFI: Introduce -fsanitize=cfi-icall flag.
This flag causes the compiler to emit bit set entries for functions as well
as runtime bitset checks at indirect call sites. Depends on the new function
bitset mechanism.

Differential Revision: http://reviews.llvm.org/D11857

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247238 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-10 02:17:40 +00:00
Peter Collingbourne a92eeaef0b docs: Document byte arrays.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231994 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-12 00:30:41 +00:00
Peter Collingbourne 42799650cb docs: Document CFI padding and all-ones optimizations. Link to viewvc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230588 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 00:18:04 +00:00
Peter Collingbourne 48900547fd docs: Document optimizations in control flow integrity design doc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230458 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-25 03:35:03 +00:00
Peter Collingbourne 8bf3730592 CFI: Improve design doc with larger virtual tables and asm examples.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230254 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-23 20:22:17 +00:00
Peter Collingbourne f9d64b33eb Implement Control Flow Integrity for virtual calls.
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.

Differential Revision: http://reviews.llvm.org/D7424

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230055 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-20 20:30:56 +00:00