summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/kfence.h
diff options
context:
space:
mode:
authorMarco Elver <elver@google.com>2021-07-28 22:57:41 +0300
committerHeiko Carstens <hca@linux.ibm.com>2021-07-30 18:09:01 +0300
commit00e67bf030e74a01afab8e0109244b9b0d7e2e43 (patch)
tree7a5140cf406c79753487514e31912a030b3fd2c6 /arch/x86/include/asm/kfence.h
parent3da77cf33cf8caf60d5cf29987885abb997a38fa (diff)
downloadlinux-00e67bf030e74a01afab8e0109244b9b0d7e2e43.tar.xz
kfence, x86: only define helpers if !MODULE
x86's <asm/tlbflush.h> only declares non-module accessible functions (such as flush_tlb_one_kernel) if !MODULE. In preparation of including <asm/kfence.h> from the KFENCE test module, only define the helpers if !MODULE to avoid breaking the build with CONFIG_KFENCE_KUNIT_TEST=m. Signed-off-by: Marco Elver <elver@google.com> Link: https://lore.kernel.org/r/YQJdarx6XSUQ1tFZ@elver.google.com Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/x86/include/asm/kfence.h')
-rw-r--r--arch/x86/include/asm/kfence.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/include/asm/kfence.h b/arch/x86/include/asm/kfence.h
index 05b48b33baf0..ff5c7134a37a 100644
--- a/arch/x86/include/asm/kfence.h
+++ b/arch/x86/include/asm/kfence.h
@@ -8,6 +8,8 @@
#ifndef _ASM_X86_KFENCE_H
#define _ASM_X86_KFENCE_H
+#ifndef MODULE
+
#include <linux/bug.h>
#include <linux/kfence.h>
@@ -66,4 +68,6 @@ static inline bool kfence_protect_page(unsigned long addr, bool protect)
return true;
}
+#endif /* !MODULE */
+
#endif /* _ASM_X86_KFENCE_H */