aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Gleixner <[email protected]>2020-04-26 16:55:15 +0000
committerBorislav Petkov <[email protected]>2020-04-26 18:16:46 +0000
commit21953ee5013d6632bee90ec89f2df59c69050db0 (patch)
tree66e484a3639268a46d4e7e35276aba5952116f70
parentx86/tlb: Restrict access to tlbstate (diff)
downloadkernel-21953ee5013d6632bee90ec89f2df59c69050db0.tar.gz
kernel-21953ee5013d6632bee90ec89f2df59c69050db0.zip
x86/cpu: Export native_write_cr4() only when CONFIG_LKTDM=m
Modules have no business poking into this but fixing this is for later. [ bp: Carve out from an earlier patch. ] Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
-rw-r--r--arch/x86/kernel/cpu/common.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 82042f40fc45..eab3ebd22927 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -387,7 +387,9 @@ set_register:
bits_missing);
}
}
+#if IS_MODULE(CONFIG_LKDTM)
EXPORT_SYMBOL_GPL(native_write_cr4);
+#endif
void cr4_update_irqsoff(unsigned long set, unsigned long clear)
{