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: e7d6eefaaa44 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
..
2015-04-24 08:23:45 -07:00
2014-06-04 16:53:57 -07:00
2014-12-13 12:42:51 -08:00
2014-10-17 13:40:51 -07:00
2015-04-21 09:33:10 -07:00
2014-11-11 17:57:46 +01:00
2015-03-05 15:25:05 +10:30
2015-04-08 09:01:54 +02:00
2014-01-03 14:37:13 +00:00
2014-06-04 16:53:57 -07:00
2014-10-17 13:40:52 -07:00
2015-03-23 10:14:00 +01:00