]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
x86/mm/cpa: Add sanity check for existing mappings
authorThomas Gleixner <tglx@linutronix.de>
Mon, 17 Sep 2018 14:29:14 +0000 (16:29 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 27 Sep 2018 18:39:39 +0000 (20:39 +0200)
commitf61c5ba2885eabc7bc4b0b2f5232f475216ba446
treec37d356a5996651e51cc648db4b84293e45eb4d4
parent69c31e69df3d2efc4ad7f53d500fdd920d3865a4
x86/mm/cpa: Add sanity check for existing mappings

With the range check it is possible to do a quick verification that the
current mapping is correct vs. the static protection areas.

In case a incorrect mapping is detected a warning is emitted and the large
page is split up. If the large page is a 2M page, then the split code is
forced to check the static protections for the PTE entries to fix up the
incorrectness. For 1G pages this can't be done easily because that would
require to either find the offending 2M areas before the split or
afterwards. For now just warn about that case and revisit it when reported.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Dave Hansen <dave.hansen@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Bin Yang <bin.yang@intel.com>
Cc: Mark Gross <mark.gross@intel.com>
Link: https://lkml.kernel.org/r/20180917143546.331408643@linutronix.de
arch/x86/mm/pageattr.c