]> git.baikalelectronics.ru Git - kernel.git/commit
x86/mm/dump_pagetables: Check PAGE_PRESENT for real
authorThomas Gleixner <tglx@linutronix.de>
Sat, 16 Dec 2017 00:14:39 +0000 (01:14 +0100)
committerIngo Molnar <mingo@kernel.org>
Fri, 22 Dec 2017 19:13:00 +0000 (20:13 +0100)
commitd64c609e50ba24ff1c6d2c809d030ff0386083e1
treea732c27364c81fb573588442da9539ffa464e87b
parent4022c2a2ddd3982a6e2a40fcbed675f10c7de2ef
x86/mm/dump_pagetables: Check PAGE_PRESENT for real

The check for a present page in printk_prot():

       if (!pgprot_val(prot)) {
                /* Not present */

is bogus. If a PTE is set to PAGE_NONE then the pgprot_val is not zero and
the entry is decoded in bogus ways, e.g. as RX GLB. That is confusing when
analyzing mapping correctness. Check for the present bit to make an
informed decision.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
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: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/mm/dump_pagetables.c