HomeFreeBSD

arm64: Support BTI checking in most of the kernel

Description

arm64: Support BTI checking in most of the kernel

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.

Reviewed by: imp, kib, emaste
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D45466

Details

Provenance
andrewAuthored on Jun 4 2024, 12:46 PM
Reviewer
imp
Differential Revision
D45466: arm64: Support BTI checking in most of the kernel
Parents
rGa5affc0c4cab: stats: Fix the build under gcc
Branches
Unknown
Tags
Unknown