about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/builder.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-07-23 20:01:07 +0000
committerbors <bors@rust-lang.org>2022-07-23 20:01:07 +0000
commit93ffde6f04d3d24327a4e17a2a2bf4f63c246235 (patch)
tree138c07c7746a3584c785e1f22d008805b342f4e0 /compiler/rustc_codegen_llvm/src/builder.rs
parent0e7c843da4b7628b8becd96970f22b57dd400ace (diff)
parentadf61e3b2b72f4a06b3ac5cf90d49deda42da605 (diff)
downloadrust-93ffde6f04d3d24327a4e17a2a2bf4f63c246235.tar.gz
rust-93ffde6f04d3d24327a4e17a2a2bf4f63c246235.zip
Auto merge of #98208 - ivanloz:master, r=nagisa
Add support for LLVM ShadowCallStack.

LLVMs ShadowCallStack provides backward edge control flow integrity protection by using a separate shadow stack to store and retrieve a function's return address.

LLVM currently only supports this for AArch64 targets. The x18 register is used to hold the pointer to the shadow stack, and therefore this only works on ABIs which reserve x18. Further details are available in the [LLVM ShadowCallStack](https://clang.llvm.org/docs/ShadowCallStack.html) docs.

# Usage
`-Zsanitizer=shadow-call-stack`

# Comments/Caveats
* Currently only enabled for the aarch64-linux-android target
* Requires the platform to define a runtime to initialize the shadow stack, see the [LLVM docs](https://clang.llvm.org/docs/ShadowCallStack.html) for more detail.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/builder.rs')
0 files changed, 0 insertions, 0 deletions