]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.18-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Jun 2026 02:53:11 +0000 (08:23 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Jun 2026 02:53:11 +0000 (08:23 +0530)
added patches:
cfi-include-uaccess.h-for-get_kernel_nofault.patch

queue-6.18/cfi-include-uaccess.h-for-get_kernel_nofault.patch [new file with mode: 0644]
queue-6.18/series

diff --git a/queue-6.18/cfi-include-uaccess.h-for-get_kernel_nofault.patch b/queue-6.18/cfi-include-uaccess.h-for-get_kernel_nofault.patch
new file mode 100644 (file)
index 0000000..f496f42
--- /dev/null
@@ -0,0 +1,47 @@
+From 979c294509f9248fe1e7c358d582fb37dd5ca12d Mon Sep 17 00:00:00 2001
+From: Nathan Chancellor <nathan@kernel.org>
+Date: Thu, 4 Jun 2026 17:33:21 -0700
+Subject: cfi: Include uaccess.h for get_kernel_nofault()
+
+From: Nathan Chancellor <nathan@kernel.org>
+
+commit 979c294509f9248fe1e7c358d582fb37dd5ca12d upstream.
+
+After commit 0652a3daa787 ("tracing: Fix CFI violation in probestub
+being called by tprobes"), there are many build errors when building
+ARCH=arm multi_v7_defconfig + CONFIG_CFI=y like:
+
+  In file included from drivers/base/devres.c:17:
+  In file included from drivers/base/trace.h:16:
+  In file included from include/linux/tracepoint.h:23:
+  include/linux/cfi.h:44:6: error: call to undeclared function 'get_kernel_nofault'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
+     44 |         if (get_kernel_nofault(hash, func - cfi_get_offset()))
+        |             ^
+  1 error generated.
+
+get_kernel_nofault() is called in the generic version of
+cfi_get_func_hash() but nothing ensures uaccess.h is always included for
+a proper expansion and prototype.  Include uaccess.h in cfi.h to clear
+up the errors.
+
+Cc: stable@vger.kernel.org
+Fixes: 0652a3daa787 ("tracing: Fix CFI violation in probestub being called by tprobes")
+Signed-off-by: Nathan Chancellor <nathan@kernel.org>
+Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
+Reviewed-by: Sami Tolvanen <samitolvanen@google.com>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ include/linux/cfi.h |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/include/linux/cfi.h
++++ b/include/linux/cfi.h
+@@ -9,6 +9,7 @@
+ #include <linux/bug.h>
+ #include <linux/module.h>
++#include <linux/uaccess.h>
+ #include <asm/cfi.h>
+ #ifdef CONFIG_CFI
index cd13138e4151be0585ab99b775533c746d7818ed..410f2ef87877f2348c18de5b7e670f94a34ba549 100644 (file)
@@ -324,3 +324,4 @@ arm64-errata-mitigate-tlbi-errata-on-nvidia-olympus-cpu.patch
 arm64-errata-mitigate-tlbi-errata-on-microsoft-azure-cobalt-100-cpu.patch
 block-fix-handling-of-dead-zone-write-plugs.patch
 vsock-virtio-fix-skb-overhead-overflow-on-32-bit-builds.patch
+cfi-include-uaccess.h-for-get_kernel_nofault.patch