-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Shadow call stack should be supported on aarch64-unknown-none #121972
Copy link
Copy link
Closed
Labels
A-sanitizersArea: Sanitizers for correctness and code qualityArea: Sanitizers for correctness and code qualityC-bugCategory: This is a bug.Category: This is a bug.O-AArch64Armv8-A or later processors in AArch64 modeArmv8-A or later processors in AArch64 modeT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-sanitizersArea: Sanitizers for correctness and code qualityArea: Sanitizers for correctness and code qualityC-bugCategory: This is a bug.Category: This is a bug.O-AArch64Armv8-A or later processors in AArch64 modeArmv8-A or later processors in AArch64 modeT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Passing the
-Zsanitizer=shadow-call-stackflag to rustc when compiling for theaarch64-unknown-nonetarget results in the following error:However, as long as the x18 register is reserved during codegen (see #121970), there shouldn't be any problem with enabling the shadow call stack sanitizer on
aarch64-unknown-none. It is already supported on several other aarch64 targets (see #121966).The Linux Kernel uses the
aarch64-unknown-nonetarget when compiling Rust code for aarch64. This flag is needed so that we can enableCONFIG_SHADOW_CALL_STACKwhen using Rust in the kernel.For more information on this sanitizer, please see the relevant chapter in the unstable book.
Related to this thread on LKML.