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.

(cherry picked from commit 3c0e9169a357f6d99b80c02dd27210d742797cf2)

Details

Provenance
markjAuthored on Nov 7 2022, 9:07 PM
Parents
rG51425bb84689: virtio: Silence a -Wunused warning
Branches
Unknown
Tags
Unknown