Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Allow to use KCOV + kASan together



details:   https://anonhg.NetBSD.org/src/rev/c75d29d499ed
branches:  trunk
changeset: 999154:c75d29d499ed
user:      kamil <kamil%NetBSD.org@localhost>
date:      Wed May 22 08:31:25 2019 +0000

description:
Allow to use KCOV + kASan together

Stop instrumenting KCOV files with kASan and the other way around.
This fixes booting of the setup of using them together.

In theory the checks could be more fine grained, however there is no good
reason (except extra DIAGNISTIC) for running a kernel sanitizer without
kernel coverage.

Patch by <R3x>

diffstat:

 share/mk/bsd.sys.mk                |  4 ++--
 sys/arch/amd64/conf/Makefile.amd64 |  4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 6474e24d7ba8 -r c75d29d499ed share/mk/bsd.sys.mk
--- a/share/mk/bsd.sys.mk       Wed May 22 07:40:09 2019 +0000
+++ b/share/mk/bsd.sys.mk       Wed May 22 08:31:25 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.sys.mk,v 1.291 2019/02/23 03:10:06 kamil Exp $
+#      $NetBSD: bsd.sys.mk,v 1.292 2019/05/22 08:31:25 kamil Exp $
 #
 # Build definitions used for NetBSD source tree builds.
 
@@ -242,7 +242,7 @@
 
 .if ${KCOV:U0} > 0
 KCOVFLAGS=     -fsanitize-coverage=trace-pc
-.for f in subr_kcov.c subr_lwp_specificdata.c subr_specificdata.c
+.for f in subr_kcov.c subr_lwp_specificdata.c subr_specificdata.c subr_asan.c
 KCOVFLAGS.${f}=                # empty
 .endfor
 CFLAGS+=       ${KCOVFLAGS.${.IMPSRC:T}:U${KCOVFLAGS}}
diff -r 6474e24d7ba8 -r c75d29d499ed sys/arch/amd64/conf/Makefile.amd64
--- a/sys/arch/amd64/conf/Makefile.amd64        Wed May 22 07:40:09 2019 +0000
+++ b/sys/arch/amd64/conf/Makefile.amd64        Wed May 22 08:31:25 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.amd64,v 1.76 2019/02/24 08:02:45 maxv Exp $
+#      $NetBSD: Makefile.amd64,v 1.77 2019/05/22 08:31:25 kamil Exp $
 
 # Makefile for NetBSD
 #
@@ -54,7 +54,7 @@
                --param asan-globals=1 --param asan-stack=1 \
                -fsanitize-address-use-after-scope \
                -fasan-shadow-offset=0xDFFF900000000000
-.for f in subr_asan.c
+.for f in subr_asan.c subr_kcov.c subr_lwp_specificdata.c subr_specificdata.c
 KASANFLAGS.${f}=       # empty
 .endfor
 CFLAGS+=       ${KASANFLAGS.${.IMPSRC:T}:U${KASANFLAGS}}



Home | Main Index | Thread Index | Old Index