summaryrefslogtreecommitdiff
path: root/arch/x86/ia32/ia32entry.S
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2015-05-19 17:12:32 +0300
committerThomas Gleixner <tglx@linutronix.de>2015-05-19 17:12:32 +0300
commitc3b5d3cea508d2c8ff493ef18c45a9cc58fb7015 (patch)
treea80672ee82fcc3d9c8d486e53731eb19cd968eb0 /arch/x86/ia32/ia32entry.S
parentdaa67b4b70568a07fef3cffacb2055891bf42ddb (diff)
parente26081808edadfd257c6c9d81014e3b25e9a6118 (diff)
downloadlinux-c3b5d3cea508d2c8ff493ef18c45a9cc58fb7015.tar.xz
Merge branch 'linus' into timers/core
Make sure the upstream fixes are applied before adding further modifications.
Diffstat (limited to 'arch/x86/ia32/ia32entry.S')
-rw-r--r--arch/x86/ia32/ia32entry.S7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S
index a821b1cd4fa7..72bf2680f819 100644
--- a/arch/x86/ia32/ia32entry.S
+++ b/arch/x86/ia32/ia32entry.S
@@ -427,6 +427,13 @@ sysretl_from_sys_call:
* cs and ss are loaded from MSRs.
* (Note: 32bit->32bit SYSRET is different: since r11
* does not exist, it merely sets eflags.IF=1).
+ *
+ * NB: On AMD CPUs with the X86_BUG_SYSRET_SS_ATTRS bug, the ss
+ * descriptor is not reinitialized. This means that we must
+ * avoid SYSRET with SS == NULL, which could happen if we schedule,
+ * exit the kernel, and re-enter using an interrupt vector. (All
+ * interrupt entries on x86_64 set SS to NULL.) We prevent that
+ * from happening by reloading SS in __switch_to.
*/
USERGS_SYSRET32