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)
Sun, Dec 8, 10:53 AM
Unknown Object (File)
Sun, Nov 17, 8:45 PM
Unknown Object (File)
Fri, Nov 15, 6:59 AM
Unknown Object (File)
Fri, Nov 15, 4:47 AM
Unknown Object (File)
Oct 9 2024, 12:36 AM
Unknown Object (File)
Oct 1 2024, 11:18 AM
Unknown Object (File)
Sep 24 2024, 2:39 AM
Unknown Object (File)
Sep 24 2024, 2:39 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.