HomeFreeBSD

Per-thread stack canary on arm64

Description

Per-thread stack canary on arm64

With the update to llvm 13 we are able to tell the compiler it can find
the SSP canary relative to the register that holds the userspace stack
pointer. As this is unused in most of the kernel it can be used here
to point to a per-thread SSP canary.

As the kernel could be built with an old toolchain, e.g. when upgrading
from 13, add a warning that the options was enabled but the compiler
doesn't support it to both the build and kernel boot.

Discussed with: emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33079

(cherry picked from commit ae92ace05fd4fcf64e3bb787951578f655b1fa5f)

Details

Provenance
andrewAuthored on Nov 22 2021, 3:20 PM
Differential Revision
D33079: Per-thread stack canary on arm64
Parents
rGb2db0024aef9: Fix bracketing in the arm64 minidump code
Branches
Unknown
Tags
Unknown