Source-Changes-HG archive

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

[src/trunk]: src/sys Register kUBSan in the GENERIC amd64 kernel config



details:   https://anonhg.NetBSD.org/src/rev/d0a3bed5ef44
branches:  trunk
changeset: 365162:d0a3bed5ef44
user:      kamil <kamil%NetBSD.org@localhost>
date:      Fri Aug 03 04:35:20 2018 +0000

description:
Register kUBSan in the GENERIC amd64 kernel config

Tested with GCC.

diffstat:

 sys/arch/amd64/conf/GENERIC |  5 +++--
 sys/kern/files.kern         |  8 +++++++-
 2 files changed, 10 insertions(+), 3 deletions(-)

diffs (45 lines):

diff -r 911fc5a7470e -r d0a3bed5ef44 sys/arch/amd64/conf/GENERIC
--- a/sys/arch/amd64/conf/GENERIC       Fri Aug 03 04:32:12 2018 +0000
+++ b/sys/arch/amd64/conf/GENERIC       Fri Aug 03 04:35:20 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.498 2018/08/01 16:59:09 maxv Exp $
+# $NetBSD: GENERIC,v 1.499 2018/08/03 04:35:20 kamil Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident         "GENERIC-$Revision: 1.498 $"
+#ident         "GENERIC-$Revision: 1.499 $"
 
 maxusers       64              # estimated number of users
 
@@ -111,6 +111,7 @@
 #options       KGDB            # remote debugger
 #options       KGDB_DEVNAME="\"com\"",KGDB_DEVADDR=0x3f8,KGDB_DEVRATE=9600
 makeoptions    DEBUG="-g"      # compile full symbol table for CTF
+#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)
diff -r 911fc5a7470e -r d0a3bed5ef44 sys/kern/files.kern
--- a/sys/kern/files.kern       Fri Aug 03 04:32:12 2018 +0000
+++ b/sys/kern/files.kern       Fri Aug 03 04:35:20 2018 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.kern,v 1.20 2018/07/18 07:06:40 msaitoh Exp $
+#      $NetBSD: files.kern,v 1.21 2018/08/03 04:35:20 kamil Exp $
 
 #
 # kernel sources
@@ -218,3 +218,9 @@
 file   miscfs/genfs/layer_vnops.c      layerfs
 
 file   miscfs/specfs/spec_vnops.c      vfs
+
+defflag        KUBSAN
+prefix ../common/lib/libc/misc
+file   ubsan.c                         kubsan
+prefix
+makeoptions    kubsan  CFLAGS+="-fsanitize=undefined"



Home | Main Index | Thread Index | Old Index