linux/arch/x86
Andy Lutomirski e990e54996 x86/tls: Don't validate lm in set_thread_area() after all
commit 3fb2f4237b upstream.

It turns out that there's a lurking ABI issue.  GCC, when
compiling this in a 32-bit program:

struct user_desc desc = {
	.entry_number    = idx,
	.base_addr       = base,
	.limit           = 0xfffff,
	.seg_32bit       = 1,
	.contents        = 0, /* Data, grow-up */
	.read_exec_only  = 0,
	.limit_in_pages  = 1,
	.seg_not_present = 0,
	.useable         = 0,
};

will leave .lm uninitialized.  This means that anything in the
kernel that reads user_desc.lm for 32-bit tasks is unreliable.

Revert the .lm check in set_thread_area().  The value never did
anything in the first place.

Fixes: 0e58af4e1d ("x86/tls: Disallow unusual TLS segments")
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/d7875b60e28c512f6a6fc0baf5714d58e7eaadbb.1418856405.git.luto@amacapital.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-08 10:00:49 -08:00
..
boot x86: Use $(OBJDUMP) instead of plain objdump 2014-12-16 09:34:26 -08:00
configs x86, defconfig: Add DEVTMPFS and DEVTMPFS_MOUNT to *86*_defconfig 2013-11-04 20:01:55 -08:00
crypto crypto: sha512_ssse3 - fix byte count to bit count conversion 2014-07-17 16:21:04 -07:00
ia32 x86_64, entry: Fix out of bounds read on sysenter 2014-11-14 08:59:47 -08:00
include x86/tls: Don't validate lm in set_thread_area() after all 2015-01-08 10:00:49 -08:00
kernel x86/tls: Don't validate lm in set_thread_area() after all 2015-01-08 10:00:49 -08:00
kvm KVM: x86: Don't report guest userspace emulation error to userspace 2014-11-21 09:23:05 -08:00
lguest x86, asmlinkage, lguest: Fix C functions used by inline assembler 2014-01-29 22:17:17 -08:00
lib x86, hash: Fix build failure with older binutils 2014-05-06 07:59:26 -07:00
math-emu x86: math-emu: Drop already-disabled print of build date 2014-01-27 23:14:12 +01:00
mm x86, mm: Set NX across entire PMD at boot 2014-12-06 15:55:33 -08:00
net net: filter: x86: fix JIT address randomization 2014-05-31 13:20:38 -07:00
oprofile perf: Fix arch_perf_out_copy_user default 2013-11-06 12:34:25 +01:00
pci x86: don't exclude low BIOS area when allocating address space for non-PCI cards 2014-09-05 16:34:15 -07:00
platform x86/efi: Make efi virtual runtime map passing more robust 2014-04-14 06:50:02 -07:00
power x86, asmlinkage, power: Make various symbols used by the suspend asm code visible 2013-08-06 14:21:03 -07:00
realmode Merge commit 'f4bcd8ccddb02833340652e9f46f5127828eb79d' into x86/build 2014-01-29 09:07:00 -08:00
syscalls x86, x32: Use compat shims for io_{setup,submit} 2014-06-30 20:12:00 -07:00
tools x86, kaslr: Handle Gold linker for finding bss/brk 2014-12-06 15:55:33 -08:00
um x86: Remove CONFIG_X86_OOSTORE 2014-03-11 10:16:18 -07:00
vdso Revert "x86-64, modify_ldt: Make support for 16-bit segments a runtime option" 2014-08-07 14:52:38 -07:00
video
xen x86/xen: don't copy bogus duplicate entries into kernel page tables 2014-10-05 14:52:17 -07:00
.gitignore
Kbuild
Kconfig x86, iosf: Make IOSF driver modular and usable by more drivers 2014-11-14 08:59:59 -08:00
Kconfig.cpu x86: Remove CONFIG_X86_OOSTORE 2014-03-11 10:16:18 -07:00
Kconfig.debug x86: Disable CONFIG_X86_DECODER_SELFTEST in allmod/allyesconfigs 2014-02-05 14:10:30 -08:00
Makefile x86-64, build: Fix stack protector Makefile breakage with 32-bit userland 2014-05-13 13:32:58 +02:00
Makefile.um
Makefile_32.cpu