x86/tls: Validate TLS entries to protect espfix
authorAndy Lutomirski <luto@amacapital.net>
Fri, 5 Dec 2014 00:48:16 +0000 (16:48 -0800)
committerZefan Li <lizefan@huawei.com>
Mon, 2 Feb 2015 09:05:25 +0000 (17:05 +0800)
commit3814999ba2bbdcfe893f36e807c7fa973cf06708
treee9d01321a751137b1482a37f7628e3e35514c61d
parentea500805ef36f95b4126c2fdd00dc33e84ac3a0a
x86/tls: Validate TLS entries to protect espfix

commit 41bdc78544b8a93a9c6814b8bbbfef966272abbe upstream.

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: 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>
Signed-off-by: Zefan Li <lizefan@huawei.com>
arch/x86/kernel/tls.c