summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test/cfi/simple-pass.cpp
Commit message (Collapse)AuthorAgeFilesLines
* cfi: Disable simple-pass.cpp on Darwin.Peter Collingbourne2018-03-091-0/+3
| | | | | | -mretpoline does not work yet on Darwin. llvm-svn: 327168
* Use branch funnels for virtual calls when retpoline mitigation is enabled.Peter Collingbourne2018-03-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The retpoline mitigation for variant 2 of CVE-2017-5715 inhibits the branch predictor, and as a result it can lead to a measurable loss of performance. We can reduce the performance impact of retpolined virtual calls by replacing them with a special construct known as a branch funnel, which is an instruction sequence that implements virtual calls to a set of known targets using a binary tree of direct branches. This allows the processor to speculately execute valid implementations of the virtual function without allowing for speculative execution of of calls to arbitrary addresses. This patch extends the whole-program devirtualization pass to replace certain virtual calls with calls to branch funnels, which are represented using a new llvm.icall.jumptable intrinsic. It also extends the LowerTypeTests pass to recognize the new intrinsic, generate code for the branch funnels (x86_64 only for now) and lay out virtual tables as required for each branch funnel. The implementation supports full LTO as well as ThinLTO, and extends the ThinLTO summary format used for whole-program devirtualization to support branch funnels. For more details see RFC: http://lists.llvm.org/pipermail/llvm-dev/2018-January/120672.html Differential Revision: https://reviews.llvm.org/D42453 llvm-svn: 327163
* Use %run for running CFI testsFilipe Cabecinhas2017-10-021-1/+1
| | | | | | | | | | Reviewers: pcc, krasin, eugenis Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38412 llvm-svn: 314659
* Reverting r277632 as it breaks the build on MacOS.Ivan Krasin2016-08-051-6/+0
| | | | | | | | Reviewers: kcc Differential Revision: https://reviews.llvm.org/D23190 llvm-svn: 277798
* Add CFI tests for -lowertypetests-bitsets-level.Ivan Krasin2016-08-031-0/+6
| | | | | | | | | | | | | Summary: -lowertypetests-bitsets-level controls which kinds of bitsets are generated, as introduced in r277556. This change adds tests to compiler-rt. Reviewers: kcc Differential Revision: https://reviews.llvm.org/D23103 llvm-svn: 277632
* Add tests for non-virtual call checking.Peter Collingbourne2015-04-021-1/+25
| | | | | | Differential Revision: http://reviews.llvm.org/D8792 llvm-svn: 233876
* CFI: Add tests for 32-bit, 64-bit and memory bitsets. Break optimization in ↵Peter Collingbourne2015-02-211-3/+1
| | | | | | more places. llvm-svn: 230116
* Add test suite for the Control Flow Integrity feature.Peter Collingbourne2015-02-201-0/+99
Differential Revision: http://reviews.llvm.org/D7738 llvm-svn: 230056
OpenPOWER on IntegriCloud