]> git.karo-electronics.de Git - karo-tx-linux.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 May 2013 03:33:14 +0000 (20:33 -0700)
commitb10a905466923f7b937d3f85237095afc2a7f6bf
tree9539f2dee699e9a9ebddd89a47d26e723395cdc2
parent851b7ca2a2426f509736448407c641c5054147d4
x86-64, init: Do not set NX bits on non-NX capable hardware

commit 78d77df71510a96e042de7ba6dbd7998103642cb upstream.

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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/head64.c
arch/x86/kernel/head_64.S