]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "x86/mm/legacy: Populate the user page-table with user pgd's"
authorJoerg Roedel <jroedel@suse.de>
Fri, 14 Sep 2018 10:59:14 +0000 (12:59 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 14 Sep 2018 15:08:45 +0000 (17:08 +0200)
commite6964d677624465652067cb7a3d522d70c6c7624
tree14cade8f610c1fb68b6dba04e5c7e5de16651368
parent21dea87d5fd3ca4b22359299eaa1ada1f59aeda8
Revert "x86/mm/legacy: Populate the user page-table with user pgd's"

This reverts commit 92fe77f070e68d73c0f6bd08533757c202b441f5.

It turned out that this patch is not sufficient to enable PTI on 32 bit
systems with legacy 2-level page-tables. In this paging mode the huge-page
PTEs are in the top-level page-table directory, where also the mirroring to
the user-space page-table happens. So every huge PTE exits twice, in the
kernel and in the user page-table.

That means that accessed/dirty bits need to be fetched from two PTEs in
this mode to be safe, but this is not trivial to implement because it needs
changes to generic code just for the sake of enabling PTI with 32-bit
legacy paging. As all systems that need PTI should support PAE anyway,
remove support for PTI when 32-bit legacy paging is used.

Fixes: 7bf4025adeb8 ('x86/pti: Allow CONFIG_PAGE_TABLE_ISOLATION for x86_32')
Reported-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: hpa@zytor.com
Cc: linux-mm@kvack.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Link: https://lkml.kernel.org/r/1536922754-31379-1-git-send-email-joro@8bytes.org
arch/x86/include/asm/pgtable-2level.h
security/Kconfig