aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2014-04-30 17:03:25 -0400
committerH. Peter Anvin <hpa@linux.intel.com>2014-04-30 17:14:49 -0400
commit246f2d2ee1d715e1077fc47d61c394569c8ee692 (patch)
tree165efb7fc0e3427593bd33c11068b2b216ac2f43
parent3891a04aafd668686239349ea58f3314ea2af86b (diff)
x86-32, espfix: Remove filter for espfix32 due to race
It is not safe to use LAR to filter when to go down the espfix path, because the LDT is per-process (rather than per-thread) and another thread might change the descriptors behind our back. Fortunately it is always *safe* (if a bit slow) to go down the espfix path, and a 32-bit LDT stack segment is extremely rare. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> Link: http://lkml.kernel.org/r/1398816946-3351-1-git-send-email-hpa@linux.intel.com Cc: <stable@vger.kernel.org> # consider after upstream merge
-rw-r--r--arch/x86/kernel/entry_32.S5
1 files changed, 0 insertions, 5 deletions
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
index a2a4f4697889..2780b8f3b96c 100644
--- a/arch/x86/kernel/entry_32.S
+++ b/arch/x86/kernel/entry_32.S
@@ -551,11 +551,6 @@ ENTRY(iret_exc)
551 551
552 CFI_RESTORE_STATE 552 CFI_RESTORE_STATE
553ldt_ss: 553ldt_ss:
554 larl PT_OLDSS(%esp), %eax
555 jnz restore_nocheck
556 testl $0x00400000, %eax # returning to 32bit stack?
557 jnz restore_nocheck # allright, normal return
558
559#ifdef CONFIG_PARAVIRT 554#ifdef CONFIG_PARAVIRT
560 /* 555 /*
561 * The kernel can't run on a non-flat stack if paravirt mode 556 * The kernel can't run on a non-flat stack if paravirt mode