diff options
| author | Kajetan Puchalski <kajetan.puchalski@arm.com> | 2024-10-16 15:39:58 +0100 |
|---|---|---|
| committer | Kajetan Puchalski <kajetan.puchalski@arm.com> | 2024-10-31 11:59:17 +0000 |
| commit | 10edeea4b48d852fb9366a2d4d4dde5055501a7c (patch) | |
| tree | 2bdbaae0dc79adc1f234df41eb542e46d179a6aa /src/doc | |
| parent | 4d296eabe4c5cfbce9bb68e6221bca2165aae97b (diff) | |
| download | rust-10edeea4b48d852fb9366a2d4d4dde5055501a7c.tar.gz rust-10edeea4b48d852fb9366a2d4d4dde5055501a7c.zip | |
rustc_codegen_llvm: Add a new 'pc' option to branch-protection
Add a new 'pc' option to -Z branch-protection for aarch64 that enables the use of PC as a diversifier in PAC branch protection code. When the pauth-lr target feature is enabled in combination with -Z branch-protection=pac-ret,pc, the new 9.5-a instructions (pacibsppc, retaasppc, etc) will be generated.
Diffstat (limited to 'src/doc')
| -rw-r--r-- | src/doc/unstable-book/src/compiler-flags/branch-protection.md | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/doc/unstable-book/src/compiler-flags/branch-protection.md b/src/doc/unstable-book/src/compiler-flags/branch-protection.md index 9276220f447..f0cc44a07f3 100644 --- a/src/doc/unstable-book/src/compiler-flags/branch-protection.md +++ b/src/doc/unstable-book/src/compiler-flags/branch-protection.md @@ -9,11 +9,12 @@ This option is only accepted when targeting AArch64 architectures. It takes some combination of the following values, separated by a `,`. - `pac-ret` - Enable pointer authentication for non-leaf functions. +- `pc` - Use PC as a diversifier using PAuthLR instructions - `leaf` - Enable pointer authentication for all functions, including leaf functions. - `b-key` - Sign return addresses with key B, instead of the default key A. - `bti` - Enable branch target identification. -`leaf` and `b-key` are only valid if `pac-ret` was previously specified. +`leaf`, `b-key` and `pc` are only valid if `pac-ret` was previously specified. For example, `-Z branch-protection=bti,pac-ret,leaf` is valid, but `-Z branch-protection=bti,leaf,pac-ret` is not. |
