]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "x86/mm/32: Set NX in __supported_pte_mask before enabling paging"
authorAndy Lutomirski <luto@kernel.org>
Tue, 26 Apr 2016 15:52:44 +0000 (08:52 -0700)
committerIngo Molnar <mingo@kernel.org>
Tue, 26 Apr 2016 17:52:57 +0000 (19:52 +0200)
commita932ceb86cdb78f13804363e3dccfb2200bbfc1d
tree16f6883c63a4930e717bb4078dc385fb7a75bcd9
parent78d37fb9134c6644aa9eebd99777aa5701e69d89
Revert "x86/mm/32: Set NX in __supported_pte_mask before enabling paging"

This reverts commit 66984673f8c9a3ad3e1ddcc4b9c888f2f4213bd9.

This change was problematic for a couple of reasons:

1. It missed a some entry points (Xen things and 64-bit native).

2. The entry it changed can be executed more than once.  This isn't
   really a problem, but it conflated per-cpu state setup and global
   state setup.

3. It broke 64-bit non-NX.  64-bit non-NX worked the other way around from
   32-bit -- __supported_pte_mask had NX set initially and was *cleared*
   in x86_configure_nx.  With the patch applied, it never got cleared.

Reported-and-tested-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/59bd15f7f4b56b633a611b7f70876c6d2ad01a98.1461685884.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/head_32.S
arch/x86/mm/setup_nx.c