OpenCloudOS-Kernel/arch/x86/ia32
Andy Lutomirski 61f01dd941 x86_64, asm: Work around AMD SYSRET SS descriptor attribute issue
AMD CPUs don't reinitialize the SS descriptor on SYSRET, so SYSRET with
SS == 0 results in an invalid usermode state in which SS is apparently
equal to __USER_DS but causes #SS if used.

Work around the issue by setting SS to __KERNEL_DS __switch_to, thus
ensuring that SYSRET never happens with SS set to NULL.

This was exposed by a recent vDSO cleanup.

Fixes: e7d6eefaaa x86/vdso32/syscall.S: Do not load __USER32_DS to %ss
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Peter Anvin <hpa@zytor.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Denys Vlasenko <vda.linux@googlemail.com>
Cc: Brian Gerst <brgerst@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-04-26 17:57:38 -07:00
..
Makefile x86/compat: Merge native and compat 32-bit syscall tables 2015-03-04 06:16:21 +01:00
audit.c x86: hook up execveat system call 2014-12-13 12:42:51 -08:00
ia32_aout.c assorted conversions to %p[dD] 2014-11-19 13:01:20 -05:00
ia32_signal.c x86/signal: Remove pax argument from restore_sigcontext 2015-04-06 09:06:39 +02:00
ia32entry.S x86_64, asm: Work around AMD SYSRET SS descriptor attribute issue 2015-04-26 17:57:38 -07:00
sys_ia32.c x86/compat: Remove sys32_vm86_warning 2015-03-04 06:16:21 +01:00