diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2020-04-26 18:55:15 +0200 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2020-04-26 20:16:46 +0200 |
commit | 21953ee5013d6632bee90ec89f2df59c69050db0 (patch) | |
tree | 66e484a3639268a46d4e7e35276aba5952116f70 /arch/x86/kernel/cpu/common.c | |
parent | bfe3d8f6313d1e10806062ba22c5f660dddecbcc (diff) | |
download | lwn-21953ee5013d6632bee90ec89f2df59c69050db0.tar.gz lwn-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 <tglx@linutronix.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20200421092558.939985695@linutronix.de
Diffstat (limited to 'arch/x86/kernel/cpu/common.c')
-rw-r--r-- | arch/x86/kernel/cpu/common.c | 2 |
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) { |