HomeFreeBSD

ksan: Build sanitizer runtimes without stack-smashing protection

Description

ksan: Build sanitizer runtimes without stack-smashing protection

On arm64 with per-thread stack canaries enabled (the PERTHREAD_SSP
option), the compiler may load curthread->td_md.md_canary in function
prologues. This is not safe in data_abort(); see commit 2c10be9e06d4.
Thus, sanitizer runtimes must also avoid accessing the current thread's
canary.

Since SSP has limited utility in sanitizer runtimes, simply disable it
unconditionally to avoid unpleasant surprises in the future.

MFC after: 2 weeks
Sponsored by: Juniper Networks, Inc.
Sponsored by: Klara, Inc.

Details

Provenance
markjAuthored on Nov 7 2022, 9:07 PM
Parents
rG03bf40c5d880: arm64: Disable per-thread stack-smashing protection in data_abort()
Branches
Unknown
Tags
Unknown