Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/amd64/conf Enable kUBSan kASan and KCOV in NetBSD/a...



details:   https://anonhg.NetBSD.org/src/rev/fad1616eb4c0
branches:  trunk
changeset: 449171:fad1616eb4c0
user:      kamil <kamil%NetBSD.org@localhost>
date:      Sun Feb 24 20:58:55 2019 +0000

description:
Enable kUBSan kASan and KCOV in NetBSD/amd64 kernel=ALL

Add disabled KLEAK as it conflicts right now with KCOV, using the same
compiler instrumentation.

diffstat:

 sys/arch/amd64/conf/ALL |  18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

diffs (46 lines):

diff -r c27702fbe4c7 -r fad1616eb4c0 sys/arch/amd64/conf/ALL
--- a/sys/arch/amd64/conf/ALL   Sun Feb 24 20:56:27 2019 +0000
+++ b/sys/arch/amd64/conf/ALL   Sun Feb 24 20:58:55 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.115 2019/02/06 11:58:30 rin Exp $
+# $NetBSD: ALL,v 1.116 2019/02/24 20:58:55 kamil Exp $
 # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
 #
 # ALL machine description file
@@ -17,7 +17,7 @@
 
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident         "ALL-$Revision: 1.115 $"
+#ident         "ALL-$Revision: 1.116 $"
 
 maxusers       64              # estimated number of users
 
@@ -120,6 +120,7 @@
 options        KGDB_DEVNAME="\"com\"",KGDB_DEVADDR=0x3f8,KGDB_DEVRATE=9600
 makeoptions    COPTS="-O2 -fno-omit-frame-pointer"
 makeoptions    DEBUG="-g"      # compile full symbol table
+options                KUBSAN          # Kernel Undefined Behavior Sanitizer (kUBSan)
 options        SYSCALL_STATS   # per syscall counts
 options        SYSCALL_TIMES   # per syscall times
 options        SYSCALL_TIMES_HASCOUNTER        # use 'broken' rdtsc (soekris)
@@ -127,6 +128,19 @@
 options        UVMHIST         # kernhist for uvm subsystem
 options        BIOHIST         # kernhist for buff I/O
 
+# Kernel Address Sanitizer (kASan). You need to disable SVS to use it.
+makeoptions    KASAN=1         # Kernel Address Sanitizer
+options                KASAN
+#no options     SVS
+
+# Kernel Info Leak Detector.
+#makeoptions   KLEAK=1
+#options               KLEAK
+
+# Kernel Code Coverage Driver.
+makeoptions    KCOV=1
+options                KCOV
+
 # Compatibility options
 options        EXEC_AOUT       # required by binaries from before 1.5
 options        COMPAT_386BSD_MBRPART # recognize old partition ID



Home | Main Index | Thread Index | Old Index