diff options
author | Mark Johnston <markj@FreeBSD.org> | 2021-09-14 18:29:27 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2021-09-14 18:29:27 +0000 |
commit | cf4670fe0b1049863ed3150a6ffb0b80dad151b2 (patch) | |
tree | 1787fd5449c3a285f2eeff618e7b43250ac97b00 /sys/conf/files | |
parent | 272c4a4dc5fbe3d82d735c5b9a3b6faab052808b (diff) | |
download | src-cf4670fe0b1049863ed3150a6ffb0b80dad151b2.tar.gz src-cf4670fe0b1049863ed3150a6ffb0b80dad151b2.zip |
kcov: Integrate with KMSAN
- kern_kcov.c needs to be compiled with -fsanitize=kernel-memory when
KMSAN is configured since it calls into various other subsystems.
- Disable address and memory sanitizers in kcov(4)'s coverage sanitizer
callbacks, as they do not provide useful checking. Moreover, with
KMSAN we may otherwise get false positives since the caller (coverage
sanitizer runtime) is not instrumented.
- Disable KASAN and KMSAN interceptors in subr_coverage.c, as they do
not provide any benefit but do introduce overhead when fuzzing.
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys/conf/files')
-rw-r--r-- | sys/conf/files | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/conf/files b/sys/conf/files index a5690ec1df75..eb0c489b7833 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -3826,7 +3826,7 @@ kern/kern_idle.c standard kern/kern_intr.c standard kern/kern_jail.c standard kern/kern_kcov.c optional kcov \ - compile-with "${NORMAL_C:N-fsanitize*}" + compile-with "${NORMAL_C:N-fsanitize*} ${NORMAL_C:M-fsanitize=kernel-memory}" kern/kern_khelp.c standard kern/kern_kthread.c standard kern/kern_ktr.c optional ktr |