Page MenuHomeFreeBSD

Per-thread stack canary on arm64
ClosedPublic

Authored by andrew on Mon, Nov 22, 4:38 PM.

Details

Summary

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.

Diff Detail

Repository
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

sys/conf/Makefile.arm64
34

perthread-ssp in COMPILER_FEATURES perhaps?

sys/conf/Makefile.arm64
34

We could although it's not something userspace could use as sp_el0 is only available to the kernel & hypervisor.

sys/conf/Makefile.arm64
34

Yeah, I guess this is fine

This revision was not accepted when it landed; it landed in state Needs Review.Fri, Nov 26, 2:51 PM
This revision was automatically updated to reflect the committed changes.