summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/python_api/thread/main.cpp
diff options
context:
space:
mode:
authorSimon Dardis <simon.dardis@mips.com>2018-02-21 00:06:53 +0000
committerSimon Dardis <simon.dardis@mips.com>2018-02-21 00:06:53 +0000
commit7bc8ad5849f451589fe2d42a58155249df76879f (patch)
tree0e887ec945c6ce788a10df5f01fdaaa97bb16f76 /lldb/packages/Python/lldbsuite/test/python_api/thread/main.cpp
parent07482d32e7d0b49a6c2697b4510bd4f0259894fa (diff)
downloadbcm5719-llvm-7bc8ad5849f451589fe2d42a58155249df76879f.tar.gz
bcm5719-llvm-7bc8ad5849f451589fe2d42a58155249df76879f.zip
[mips] Spectre variant two mitigation for MIPSR2
This patch provides mitigation for CVE-2017-5715, Spectre variant two, which affects the P5600 and P6600. It implements the LLVM part of -mindirect-jump=hazard. It is _not_ enabled by default for the P5600. The migitation strategy suggested by MIPS for these processors is to use hazard barrier instructions. 'jalr.hb' and 'jr.hb' are hazard barrier variants of the 'jalr' and 'jr' instructions respectively. These instructions impede the execution of instruction stream until architecturally defined hazards (changes to the instruction stream, privileged registers which may affect execution) are cleared. These instructions in MIPS' designs are not speculated past. These instructions are used with the attribute +use-indirect-jump-hazard when branching indirectly and for indirect function calls. These instructions are defined by the MIPS32R2 ISA, so this mitigation method is not compatible with processors which implement an earlier revision of the MIPS ISA. Performance benchmarking of this option with -fpic and lld using -z hazardplt shows a difference of overall 10%~ time increase for the LLVM testsuite. Certain benchmarks such as methcall show a substantially larger increase in time due to their nature. Reviewers: atanasyan, zoran.jovanovic Differential Revision: https://reviews.llvm.org/D43486 llvm-svn: 325653
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api/thread/main.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud