]> git.itanic.dy.fi Git - linux-stable/commit
x86, tls, ldt: Stop checking lm in LDT_empty
authorAndy Lutomirski <luto@amacapital.net>
Thu, 22 Jan 2015 19:27:58 +0000 (11:27 -0800)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 20 Feb 2015 00:49:39 +0000 (00:49 +0000)
commitf62570cbdcb6dd53d0e2361488f9ea2c4cf17ec9
tree2630aac9ef065f08383a11682bd59863da67f4a8
parentcea62dbdc110e3e8d5db8fb9eebebf01587830b8
x86, tls, ldt: Stop checking lm in LDT_empty

commit e30ab185c490e9a9381385529e0fd32f0a399495 upstream.

32-bit programs don't have an lm bit in their ABI, so they can't
reliably cause LDT_empty to return true without resorting to memset.
They shouldn't need to do this.

This should fix a longstanding, if minor, issue in all 64-bit kernels
as well as a potential regression in the TLS hardening code.

Fixes: 41bdc78544b8 x86/tls: Validate TLS entries to protect espfix
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Cc: torvalds@linux-foundation.org
Link: http://lkml.kernel.org/r/72a059de55e86ad5e2935c80aa91880ddf19d07c.1421954363.git.luto@amacapital.net
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
arch/x86/include/asm/desc.h