]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
objtool, panic: Disable SMAP in __stack_chk_fail()
authorJosh Poimboeuf <jpoimboe@kernel.org>
Mon, 24 Mar 2025 21:56:07 +0000 (14:56 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 May 2025 05:50:55 +0000 (07:50 +0200)
commit4ab980b5c3098facdf140b8818ec7f1869ff7545
tree533d912ee0125620b681ce6da19a763a52436a5e
parent97f70d27bee2a67002264023a0e64af916f5f9aa
objtool, panic: Disable SMAP in __stack_chk_fail()

[ Upstream commit 72c774aa9d1e16bfd247096935e7dae194d84929 ]

__stack_chk_fail() can be called from uaccess-enabled code.  Make sure
uaccess gets disabled before calling panic().

Fixes the following warning:

  kernel/trace/trace_branch.o: error: objtool: ftrace_likely_update+0x1ea: call to __stack_chk_fail() with UACCESS enabled

Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/a3e97e0119e1b04c725a8aa05f7bc83d98e657eb.1742852847.git.jpoimboe@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/panic.c
tools/objtool/check.c