Module Name:    src
Committed By:   kamil
Date:           Wed Feb 13 18:04:35 UTC 2019

Modified Files:
        src/sys/kern: files.kern

Log Message:
Silent UB alignment issues in acpica under kUBSan

Pass -DACPI_MISALIGNMENT_NOT_SUPPORTED under kUBSan enabled. This option
is dedicated for alignment sensitive CPUs in acpica. It was originally
designed for Itanium CPUs, but nowadays it's wanted for aarch64 as well.

Define it in acpica code under kUBSan in order to pacify Undefined Behavior
reports on all ports (in particular x86). The number of reports is now
halved with this patch applied. The remaining alignment alarms in acpica
will be addressed in future.

Patch contributed by <Akul Pillai>


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 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/kern/files.kern
diff -u src/sys/kern/files.kern:1.31 src/sys/kern/files.kern:1.32
--- src/sys/kern/files.kern:1.31	Sun Jan 27 02:08:43 2019
+++ src/sys/kern/files.kern	Wed Feb 13 18:04:35 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: files.kern,v 1.31 2019/01/27 02:08:43 pgoyette Exp $
+#	$NetBSD: files.kern,v 1.32 2019/02/13 18:04:35 kamil Exp $
 
 #
 # kernel sources
@@ -228,3 +228,4 @@ prefix	../common/lib/libc/misc
 file	ubsan.c				kubsan
 prefix
 makeoptions	kubsan	CFLAGS+="-fsanitize=undefined"
+makeoptions	kubsan	CPPFLAGS+="-DACPI_MISALIGNMENT_NOT_SUPPORTED"

Reply via email to