From: H. Peter Anvin Date: Wed, 30 Apr 2014 21:03:25 +0000 (-0700) Subject: x86-32, espfix: Remove filter for espfix32 due to race X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7a1d06c86697d727ef095f6e675e378ee9caae1a;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git x86-32, espfix: Remove filter for espfix32 due to race commit 246f2d2ee1d715e1077fc47d61c394569c8ee692 upstream. 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 Link: http://lkml.kernel.org/r/1398816946-3351-1-git-send-email-hpa@linux.intel.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S index 94e52cf064b0..7885ea31a9aa 100644 --- a/arch/x86/kernel/entry_32.S +++ b/arch/x86/kernel/entry_32.S @@ -554,11 +554,6 @@ ENTRY(iret_exc) CFI_RESTORE_STATE ldt_ss: - larl PT_OLDSS(%esp), %eax - jnz restore_nocheck - testl $0x00400000, %eax # returning to 32bit stack? - jnz restore_nocheck # allright, normal return - #ifdef CONFIG_PARAVIRT /* * The kernel can't run on a non-flat stack if paravirt mode