From: "tip-bot for H. Peter Anvin" <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
tglx@linutronix.de, hpa@linux.intel.com
Subject: [tip:x86/espfix] x86-32, espfix: Remove filter for espfix32 due to race
Date: Wed, 30 Apr 2014 14:19:10 -0700 [thread overview]
Message-ID: <tip-246f2d2ee1d715e1077fc47d61c394569c8ee692@git.kernel.org> (raw)
In-Reply-To: <1398816946-3351-1-git-send-email-hpa@linux.intel.com>
Commit-ID: 246f2d2ee1d715e1077fc47d61c394569c8ee692
Gitweb: http://git.kernel.org/tip/246f2d2ee1d715e1077fc47d61c394569c8ee692
Author: H. Peter Anvin <hpa@linux.intel.com>
AuthorDate: Wed, 30 Apr 2014 14:03:25 -0700
Committer: H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Wed, 30 Apr 2014 14:14:49 -0700
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
---
arch/x86/kernel/entry_32.S | 5 -----
1 file changed, 5 deletions(-)
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
index a2a4f46..2780b8f 100644
--- a/arch/x86/kernel/entry_32.S
+++ b/arch/x86/kernel/entry_32.S
@@ -551,11 +551,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
next prev parent reply other threads:[~2014-04-30 21:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-30 0:15 [PATCH] x86-64, espfix: Don't leak bits 31:16 of %esp returning to 16-bit stack H. Peter Anvin
2014-04-30 0:57 ` Linus Torvalds
2014-04-30 10:38 ` Borislav Petkov
2014-04-30 16:18 ` H. Peter Anvin
2014-04-30 16:33 ` H. Peter Anvin
2014-04-30 17:16 ` Borislav Petkov
2014-04-30 17:25 ` H. Peter Anvin
2014-04-30 21:18 ` [tip:x86/espfix] x86-64, espfix: Don't leak bits 31: 16 " tip-bot for H. Peter Anvin
2014-04-30 21:19 ` tip-bot for H. Peter Anvin [this message]
2014-05-04 17:07 ` [tip:x86/espfix] x86, espfix: Make espfix64 a Kconfig option, fix UML tip-bot for H. Peter Anvin
2014-05-04 19:03 ` [tip:x86/espfix] x86, espfix: Make it possible do disable 16-bit support tip-bot for H. Peter Anvin
2014-05-04 19:30 ` [tip:x86/espfix] x86, espfix: Make it possible to " tip-bot for H. Peter Anvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-246f2d2ee1d715e1077fc47d61c394569c8ee692@git.kernel.org \
--to=tipbot@zytor.com \
--cc=hpa@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.