mm/kasan/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kasan_report() has a uaccess critical section which can't have any
instrumentation calls in the middle. Disable the stackleak plugin for
the report code.
Fixes the following warning:
vmlinux.o: warning: objtool: kasan_report+0x12: call to stackleak_track_stack() with UACCESS enabled
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
---
mm/kasan/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/kasan/Makefile b/mm/kasan/Makefile
index d4837bff3b60..da2976365197 100644
--- a/mm/kasan/Makefile
+++ b/mm/kasan/Makefile
@@ -27,7 +27,7 @@ CFLAGS_common.o := $(CC_FLAGS_KASAN_RUNTIME)
CFLAGS_generic.o := $(CC_FLAGS_KASAN_RUNTIME)
CFLAGS_init.o := $(CC_FLAGS_KASAN_RUNTIME)
CFLAGS_quarantine.o := $(CC_FLAGS_KASAN_RUNTIME)
-CFLAGS_report.o := $(CC_FLAGS_KASAN_RUNTIME)
+CFLAGS_report.o := $(CC_FLAGS_KASAN_RUNTIME) $(DISABLE_STACKLEAK_PLUGIN)
CFLAGS_report_generic.o := $(CC_FLAGS_KASAN_RUNTIME)
CFLAGS_report_hw_tags.o := $(CC_FLAGS_KASAN_RUNTIME)
CFLAGS_report_sw_tags.o := $(CC_FLAGS_KASAN_RUNTIME)
--
2.37.3
On Tue, Oct 11, 2022 at 12:05 PM Josh Poimboeuf <jpoimboe@kernel.org> wrote:
>
> kasan_report() has a uaccess critical section which can't have any
> instrumentation calls in the middle. Disable the stackleak plugin for
> the report code.
I see Andrew already picked this up, but I can confirm that it
obviously fixes the problem here for me.
I'll get it the usual channels from Andrew.
Thanks,
Linus
© 2016 - 2026 Red Hat, Inc.