From: Thomas Gleixner Date: Sun, 26 Apr 2020 16:55:15 +0000 (+0200) Subject: x86/cpu: Export native_write_cr4() only when CONFIG_LKTDM=m X-Git-Tag: v5.8-rc1~134^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=21953ee5013d6632bee90ec89f2df59c69050db0;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200421092558.939985695@linutronix.de --- diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 82042f40fc45a..eab3ebd22927e 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) {