[tip: locking/kcsan] kcsan, ubsan: Make KCSAN+UBSAN work together

From: tip-bot2 for Marco Elver
Date: Fri Jan 24 2020 - 04:13:41 EST


The following commit has been merged into the locking/kcsan branch of tip:

Commit-ID: d47715f50e833f12c5e829ce9dcc4a65104fa74f
Gitweb: https://git.kernel.org/tip/d47715f50e833f12c5e829ce9dcc4a65104fa74f
Author: Marco Elver <elver@xxxxxxxxxx>
AuthorDate: Tue, 19 Nov 2019 19:57:42 +01:00
Committer: Paul E. McKenney <paulmck@xxxxxxxxxx>
CommitterDate: Tue, 07 Jan 2020 07:47:23 -08:00

kcsan, ubsan: Make KCSAN+UBSAN work together

Context:
http://lkml.kernel.org/r/fb7e25d8-aba4-3dcf-7761-cb7ecb3ebb71@xxxxxxxxxxxxx

Reported-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Signed-off-by: Marco Elver <elver@xxxxxxxxxx>
Acked-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx> # build-tested
Signed-off-by: Paul E. McKenney <paulmck@xxxxxxxxxx>
---
kernel/kcsan/Makefile | 1 +
lib/Makefile | 1 +
2 files changed, 2 insertions(+)

diff --git a/kernel/kcsan/Makefile b/kernel/kcsan/Makefile
index dd15b62..df6b779 100644
--- a/kernel/kcsan/Makefile
+++ b/kernel/kcsan/Makefile
@@ -1,6 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
KCSAN_SANITIZE := n
KCOV_INSTRUMENT := n
+UBSAN_SANITIZE := n

CFLAGS_REMOVE_core.o = $(CC_FLAGS_FTRACE)

diff --git a/lib/Makefile b/lib/Makefile
index 778ab70..9d5bda9 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -279,6 +279,7 @@ obj-$(CONFIG_UBSAN) += ubsan.o

UBSAN_SANITIZE_ubsan.o := n
KASAN_SANITIZE_ubsan.o := n
+KCSAN_SANITIZE_ubsan.o := n
CFLAGS_ubsan.o := $(call cc-option, -fno-stack-protector) $(DISABLE_STACKLEAK_PLUGIN)

obj-$(CONFIG_SBITMAP) += sbitmap.o