Passing the -Zsanitizer=shadow-call-stack flag to rustc when compiling for the aarch64-unknown-none target results in the following error:
error: shadow-call-stack sanitizer is not supported for this target
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-none target when compiling Rust code for aarch64. This flag is needed so that we can enable CONFIG_SHADOW_CALL_STACK when 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.
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.