alistair23-linux/arch/x86
Joerg Roedel d878efce73 x86/mm/pti: Move user W+X check into pti_finalize()
The user page-table gets the updated kernel mappings in pti_finalize(),
which runs after the RO+X permissions got applied to the kernel page-table
in mark_readonly().

But with CONFIG_DEBUG_WX enabled, the user page-table is already checked in
mark_readonly() for insecure mappings.  This causes false-positive
warnings, because the user page-table did not get the updated mappings yet.

Move the W+X check for the user page-table into pti_finalize() after it
updated all required mappings.

[ tglx: Folded !NX supported fix ]

Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: "H . Peter Anvin" <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: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: David Laight <David.Laight@aculab.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Eduardo Valentin <eduval@amazon.com>
Cc: Greg KH <gregkh@linuxfoundation.org>
Cc: Will Deacon <will.deacon@arm.com>
Cc: aliguori@amazon.com
Cc: daniel.gruss@iaik.tugraz.at
Cc: hughd@google.com
Cc: keescook@google.com
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Waiman Long <llong@redhat.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: "David H . Gutteridge" <dhgutteridge@sympatico.ca>
Cc: joro@8bytes.org
Link: https://lkml.kernel.org/r/1533727000-9172-1-git-send-email-joro@8bytes.org
2018-08-10 21:12:45 +02:00
..
boot x86/boot/compressed/64: Validate trampoline placement against E820 2018-08-02 14:22:22 +02:00
configs
crypto crypto: x86 - Add missing RETs 2018-07-01 23:33:20 +08:00
entry Merge branch 'x86/pti-urgent' into x86/pti 2018-08-06 20:56:34 +02:00
events perf/x86/intel/uncore: Fix hardcoded index of Broadwell extra PCI devices 2018-07-31 07:43:37 +02:00
hyperv x86/hyper-v: Fix the circular dependency in IPI enlightenment 2018-07-06 12:32:59 +02:00
ia32
include x86/mm/pti: Move user W+X check into pti_finalize() 2018-08-10 21:12:45 +02:00
kernel Merge branch 'x86/pti-urgent' into x86/pti 2018-08-06 20:56:34 +02:00
kvm Two bugfixes. 2018-08-03 13:43:59 -07:00
lib libnvdimm for 4.18 2018-06-08 17:21:52 -07:00
math-emu
mm x86/mm/pti: Move user W+X check into pti_finalize() 2018-08-10 21:12:45 +02:00
net bpf, x32: Fix regression caused by commit 24dea04767 2018-07-26 02:51:12 +02:00
oprofile
pci treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
platform x86/efi: Access EFI MMIO data as unencrypted when SEV is active 2018-07-22 14:10:38 +02:00
power x86/mm: Stop pretending pgtable_l5_enabled is a variable 2018-05-19 11:56:57 +02:00
purgatory x86/purgatory: add missing FORCE to Makefile target 2018-07-14 11:11:09 -07:00
ras
realmode
tools x86/relocs: Add __end_rodata_aligned to S_REL 2018-08-09 20:42:07 +02:00
um mm: use vma_init() to initialize VMAs on stack and data segments 2018-07-26 19:38:03 -07:00
video
xen xen: fixes for 4.18-rc5 2018-07-14 12:30:13 -07:00
.gitignore
Kbuild
Kconfig x86/asm/memcpy_mcsafe: Fix copy_to_user_mcsafe() exception handling 2018-07-16 00:05:05 +02:00
Kconfig.cpu
Kconfig.debug x86, nfit_test: Add unit test for memcpy_mcsafe() 2018-05-22 23:18:31 -07:00
Makefile Merge branch 'linus' into x86/urgent 2018-06-22 21:20:35 +02:00
Makefile.um
Makefile_32.cpu