x86/tlb: Uninline nmi_uaccess_okay()
authorThomas Gleixner <tglx@linutronix.de>
Tue, 21 Apr 2020 09:20:40 +0000 (11:20 +0200)
committerBorislav Petkov <bp@suse.de>
Sun, 26 Apr 2020 16:47:05 +0000 (18:47 +0200)
commitaf5c40c6ee057c5354930abdc4d34be013d0e9e0
tree2f896585df0ad3e920159e8c630dbc70ab136f26
parent96f59fe291d2cdc0fcb6f5f2f4b7c9cea9533fc3
x86/tlb: Uninline nmi_uaccess_okay()

cpu_tlbstate is exported because various TLB-related functions need
access to it, but cpu_tlbstate is sensitive information which should
only be accessed by well-contained kernel functions and not be directly
exposed to modules.

nmi_access_ok() is the last inline function which requires access to
cpu_tlbstate. Move it into the TLB code.

No functional change.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Alexandre Chartre <alexandre.chartre@oracle.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20200421092600.052543007@linutronix.de
arch/x86/include/asm/tlbflush.h
arch/x86/mm/tlb.c