x86/tls: Validate TLS entries to protect espfix
authorAndy Lutomirski <luto@amacapital.net>
Fri, 5 Dec 2014 00:48:16 +0000 (16:48 -0800)
committerIngo Molnar <mingo@kernel.org>
Sun, 14 Dec 2014 07:50:31 +0000 (08:50 +0100)
commit41bdc78544b8a93a9c6814b8bbbfef966272abbe
tree9c947f48aa4a6e357fc96a4a695271192252f480
parentf0905c5a32ce6e9b743b4d9c70e53d1ce447852d
x86/tls: Validate TLS entries to protect espfix

Installing a 16-bit RW data segment into the GDT defeats espfix.
AFAICT this will not affect glibc, Wine, or dosemu at all.

Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Cc: stable@vger.kernel.org
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: security@kernel.org <security@kernel.org>
Cc: Willy Tarreau <w@1wt.eu>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/tls.c