Initial back-edge CFI implementation (#3606)

Give the user the option to sign and to authenticate function
return addresses with the operations introduced by the Pointer
Authentication extension to the Arm instruction set architecture.

Copyright (c) 2021, Arm Limited.
This commit is contained in:
Anton Kirilov
2022-08-03 19:08:29 +01:00
committed by GitHub
parent 709716bb8e
commit a897742593
17 changed files with 319 additions and 43 deletions

View File

@@ -132,6 +132,14 @@ pub fn builder_with_options(infer_native_flags: bool) -> Result<isa::Builder, &'
if std::arch::is_aarch64_feature_detected!("lse") {
isa_builder.enable("has_lse").unwrap();
}
if std::arch::is_aarch64_feature_detected!("paca") {
isa_builder.enable("has_pauth").unwrap();
}
if cfg!(target_os = "macos") {
isa_builder.enable("sign_return_address_with_bkey").unwrap();
}
}
// There is no is_s390x_feature_detected macro yet, so for now