- Initialize KASAN before executing SYSINITs.
- Add a kernel config.
- 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.
- R10:f115c0612131: amd64: Add MD bits for KASAN
|7 ↗||(On Diff #86412)|
I have a WIP KMSAN port as well, just didn't split this commit properly.
Some of the ASAN options seem to increase stack usage rather substantially. I was able to trigger a double fault with ZFS due to a stack overflow with 4 kstack pages.