]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
amd64: Add MD bits for KASAN
authorMark Johnston <markj@FreeBSD.org>
Tue, 13 Apr 2021 21:39:35 +0000 (17:39 -0400)
committerMark Johnston <markj@FreeBSD.org>
Tue, 13 Apr 2021 21:42:20 +0000 (17:42 -0400)
commitf115c0612131d8f939f6f357f57bdd85bd6a59de
tree86d48339adbef744871533cf4ea00c9ab9cf457b
parent6faf45b34b14da5f138774b43ec14fb5567ac584
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
sys/amd64/amd64/machdep.c
sys/amd64/conf/GENERIC-KASAN [new file with mode: 0644]
sys/amd64/include/param.h
sys/x86/isa/atpic.c
sys/x86/x86/local_apic.c