Allow SCS for riscv64 too.

Bug: https://github.com/google/android-riscv64/issues/55
Test: treehugger
Change-Id: I319fc662c1dd6083757f78b8d91ec2775ef94a46
This commit is contained in:
Elliott Hughes
2023-02-09 21:15:47 +00:00
parent a9242e32d5
commit e4793bc73f
2 changed files with 7 additions and 3 deletions

View File

@@ -254,7 +254,7 @@ type SanitizeUserProps struct {
// This should not be used in Android 11+ : https://source.android.com/devices/tech/debug/scudo
// deprecated
Scudo *bool `android:"arch_variant"`
// shadow-call-stack sanitizer, only available on arm64
// shadow-call-stack sanitizer, only available on arm64/riscv64.
Scs *bool `android:"arch_variant"`
// Memory-tagging, only available on arm64
// if diag.memtag unset or false, enables async memory tagging
@@ -593,8 +593,8 @@ func (sanitize *sanitize) begin(ctx BaseModuleContext) {
s.Hwaddress = nil
}
// SCS is only implemented on AArch64.
if ctx.Arch().ArchType != android.Arm64 || !ctx.toolchain().Bionic() {
// SCS is only implemented on AArch64/riscv64.
if (ctx.Arch().ArchType != android.Arm64 && ctx.Arch().ArchType != android.Riscv64) || !ctx.toolchain().Bionic() {
s.Scs = nil
}