Page MenuHomeFreeBSD

Per-thread stack canary on arm64
ClosedPublic

Authored by andrew on Nov 22 2021, 4:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Mar 14, 9:24 AM
Unknown Object (File)
Feb 16 2024, 10:12 AM
Unknown Object (File)
Jan 2 2024, 4:32 PM
Unknown Object (File)
Dec 26 2023, 10:32 PM
Unknown Object (File)
Dec 20 2023, 6:53 AM
Unknown Object (File)
Nov 24 2023, 9:22 PM
Unknown Object (File)
Nov 15 2023, 5:49 PM
Unknown Object (File)
Nov 9 2023, 5:17 AM
Subscribers

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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/conf/Makefile.arm64
35

perthread-ssp in COMPILER_FEATURES perhaps?

sys/conf/Makefile.arm64
35

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

sys/conf/Makefile.arm64
35

Yeah, I guess this is fine

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