Page MenuHomeFreeBSD

arm64: Support BTI checking in most of the kernel
ClosedPublic

Authored by andrew on Jun 3 2024, 4:21 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 13, 5:36 PM
Unknown Object (File)
Tue, Oct 7, 4:48 AM
Unknown Object (File)
Wed, Oct 1, 4:46 AM
Unknown Object (File)
Mon, Sep 29, 12:51 PM
Unknown Object (File)
Thu, Sep 25, 1:16 PM
Unknown Object (File)
Tue, Sep 16, 11:00 AM
Unknown Object (File)
Sep 11 2025, 6:22 AM
Unknown Object (File)
Sep 10 2025, 2:34 PM

Details

Summary

LLD has the -zbti-report=error argument to check if the BTI note is
present when linking. To allow for this to be used when linking the
kernel and modules:

  • Add the BTI note to the remaining assembly files
  • Mark ptrauth.c as protected by BTI
  • Disable -zbti-report for vmm hypervisor switching code as it's not used there.

The linux64 module doesn't build with the flag as it includes vdso code
that doesn't include the note.

Sponsored by: Arm Ltd

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable