linux_dsm_epyc7002/arch
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
..
alpha alpha: fix osf_wait4() breakage 2018-07-22 11:51:30 -07:00
arc arc: fix type warnings in arc/mm/cache.c 2018-07-30 11:48:50 -07:00
arm Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm 2018-08-01 15:01:26 -07:00
arm64 arm64 regression fix 2018-08-02 10:21:49 -07:00
c6x
h8300
hexagon
ia64 mm: do not initialize TLB stack vma's with vma_init() 2018-08-01 13:43:38 -07:00
m68k
microblaze
mips One more fix for 4.18: 2018-07-28 12:32:28 -07:00
nds32
nios2
openrisc
parisc
powerpc powerpc fixes for 4.18 #5 2018-08-03 10:38:21 -07:00
riscv
s390 s390: disable gcc plugins 2018-07-24 08:10:52 +02:00
sh
sparc sparc: use asm-generic version of msi.h 2018-07-30 13:00:56 -07:00
um
unicore32
x86 x86/mm/pti: Move user W+X check into pti_finalize() 2018-08-10 21:12:45 +02:00
xtensa
.gitignore
Kconfig