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.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D29455

Details

Provenance
markjAuthored on Apr 13 2021, 9:39 PM
Differential Revision
D29455: amd64: Add MD bits for KASAN
Parents
rG6faf45b34b14: amd64: Implement a KASAN shadow map
Branches
Unknown
Tags
Unknown