summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorNathan Chancellor <nathan@kernel.org>2026-06-04 17:33:21 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2026-06-06 15:08:36 -0700
commit979c294509f9248fe1e7c358d582fb37dd5ca12d (patch)
tree65c1326bd86a5021eb936392cf606791547f4988 /include/linux
parent6086121dc424b6906602617449f0445aeab00277 (diff)
downloadlwn-979c294509f9248fe1e7c358d582fb37dd5ca12d.tar.gz
lwn-979c294509f9248fe1e7c358d582fb37dd5ca12d.zip
cfi: Include uaccess.h for get_kernel_nofault()
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>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/cfi.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/cfi.h b/include/linux/cfi.h
index 1fd22ea6eba4..0f220d29225c 100644
--- 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