소스 검색

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
H. Peter Anvin 11 년 전
부모
커밋
246f2d2ee1
1개의 변경된 파일0개의 추가작업 그리고 5개의 파일을 삭제
  1. 0 5
      arch/x86/kernel/entry_32.S

+ 0 - 5
arch/x86/kernel/entry_32.S

@@ -551,11 +551,6 @@ ENTRY(iret_exc)
 
 
 	CFI_RESTORE_STATE
 	CFI_RESTORE_STATE
 ldt_ss:
 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
 #ifdef CONFIG_PARAVIRT
 	/*
 	/*
 	 * The kernel can't run on a non-flat stack if paravirt mode
 	 * The kernel can't run on a non-flat stack if paravirt mode