]> git.baikalelectronics.ru Git - kernel.git/commit
x86-64, init: Do not set NX bits on non-NX capable hardware
authorH. Peter Anvin <hpa@linux.intel.com>
Thu, 2 May 2013 17:33:46 +0000 (10:33 -0700)
committerH. Peter Anvin <hpa@linux.intel.com>
Thu, 2 May 2013 18:27:35 +0000 (11:27 -0700)
commitecda269b1eab5c9103ebd0cf3912b5707f3c7432
tree9b948900c1493a5f1711b59235db842bc40adfb1
parent293a552ba392e0fe87d0936cadb0a7866314e3c7
x86-64, init: Do not set NX bits on non-NX capable hardware

During early init, we would incorrectly set the NX bit even if the NX
feature was not supported.  Instead, only set this bit if NX is
actually available and enabled.  We already do very early detection of
the NX bit to enable it in EFER, this simply extends this detection to
the early page table mask.

Reported-by: Fernando Luis Vázquez Cao <fernando@oss.ntt.co.jp>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Link: http://lkml.kernel.org/r/1367476850.5660.2.camel@nexus
Cc: <stable@vger.kernel.org> v3.9
arch/x86/kernel/head64.c
arch/x86/kernel/head_64.S