Re: [PATCH -next] kcsan, ubsan: Make KCSAN+UBSAN work together

From: Paul E. McKenney
Date: Tue Nov 19 2019 - 15:16:46 EST


On Tue, Nov 19, 2019 at 07:57:42PM +0100, Marco Elver wrote:
> 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>

Applied and pushed out on -rcu's "kcsan" branch, thank you both!

Thanx, Paul

> ---
> kernel/kcsan/Makefile | 1 +
> lib/Makefile | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/kernel/kcsan/Makefile b/kernel/kcsan/Makefile
> index dd15b62ec0b5..df6b7799e492 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 778ab704e3ad..9d5bda950f5f 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
> --
> 2.24.0.432.g9d3f5f5b63-goog