HomeFreeBSD

amd64: Add MD bits for KASAN

Description

amd64: Add MD bits for KASAN

  • Initialize KASAN before executing SYSINITs.
  • Add a GENERIC-KASAN kernel config, akin to GENERIC-KCSAN.
  • Increase the kernel stack size if KASAN is enabled. Some of the ASAN instrumentation increases stack usage and it's enough to trigger stack overflows in ZFS.
  • Mark the trapframe as valid in interrupt handlers if it is assigned to td_intr_frame. Otherwise, an interrupt in a function which creates a poisoned alloca region can trigger false positives.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit f115c0612131d8f939f6f357f57bdd85bd6a59de)

Details

Provenance
markjAuthored on Apr 13 2021, 9:39 PM
Parents
rGa3d4c8e21d64: amd64: Implement a KASAN shadow map
Branches
Unknown
Tags
Unknown