Skip to content

Shadow call stack should be supported on aarch64-unknown-none #121972

Open
@Darksonn

Description

@Darksonn

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.

Metadata

Metadata

Labels

A-sanitizersArea: Sanitizers for correctness and code qualityC-bugCategory: This is a bug.O-AArch64Armv8-A or later processors in AArch64 modeT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions