]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit - arch/x86/Kconfig
x86/mm/cpa: Add set_direct_map_*() functions
authorRick Edgecombe <rick.p.edgecombe@intel.com>
Fri, 26 Apr 2019 00:11:34 +0000 (17:11 -0700)
committerIngo Molnar <mingo@kernel.org>
Tue, 30 Apr 2019 10:37:56 +0000 (12:37 +0200)
commitd253ca0c3865a8d9a8c01143cf20425e0be4d0ce
treec979fb7c9a7f21a35a7a487d6d09b278999fae2d
parent0a203df5cf0eb709be4f190314e262b72d7e5b76
x86/mm/cpa: Add set_direct_map_*() functions

Add two new functions set_direct_map_default_noflush() and
set_direct_map_invalid_noflush() for setting the direct map alias for the
page to its default valid permissions and to an invalid state that cannot
be cached in a TLB, respectively. These functions do not flush the TLB.

Note, __kernel_map_pages() does something similar but flushes the TLB and
doesn't reset the permission bits to default on all architectures.

Also add an ARCH config ARCH_HAS_SET_DIRECT_MAP for specifying whether
these have an actual implementation or a default empty one.

Signed-off-by: Rick Edgecombe <rick.p.edgecombe@intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: <akpm@linux-foundation.org>
Cc: <ard.biesheuvel@linaro.org>
Cc: <deneen.t.dock@intel.com>
Cc: <kernel-hardening@lists.openwall.com>
Cc: <kristen@linux.intel.com>
Cc: <linux_dti@icloud.com>
Cc: <will.deacon@arm.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Nadav Amit <nadav.amit@gmail.com>
Cc: Rik van Riel <riel@surriel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20190426001143.4983-15-namit@vmware.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/Kconfig
arch/x86/Kconfig
arch/x86/include/asm/set_memory.h
arch/x86/mm/pageattr.c
include/linux/set_memory.h