Module Name:    src
Committed By:   kamil
Date:           Fri Aug  3 04:35:20 UTC 2018

Modified Files:
        src/sys/arch/amd64/conf: GENERIC
        src/sys/kern: files.kern

Log Message:
Register kUBSan in the GENERIC amd64 kernel config

Tested with GCC.


To generate a diff of this commit:
cvs rdiff -u -r1.498 -r1.499 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.20 -r1.21 src/sys/kern/files.kern

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/amd64/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.498 src/sys/arch/amd64/conf/GENERIC:1.499
--- src/sys/arch/amd64/conf/GENERIC:1.498	Wed Aug  1 16:59:09 2018
+++ src/sys/arch/amd64/conf/GENERIC	Fri Aug  3 04:35:20 2018
@@ -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 @@ include 	"arch/amd64/conf/std.amd64"
 
 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 	DDB_HISTORY_SIZE=512	# enable h
 #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)

Index: src/sys/kern/files.kern
diff -u src/sys/kern/files.kern:1.20 src/sys/kern/files.kern:1.21
--- src/sys/kern/files.kern:1.20	Wed Jul 18 07:06:40 2018
+++ src/sys/kern/files.kern	Fri Aug  3 04:35:20 2018
@@ -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_vfsops.c	layerfs
 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"

Reply via email to