linux/arch/x86
Linus Torvalds 62dcb5801a x86-64, modify_ldt: Make support for 16-bit segments a runtime option
commit fa81511bb0 upstream.

Checkin:

b3b42ac2cb x86-64, modify_ldt: Ban 16-bit segments on 64-bit kernels

disabled 16-bit segments on 64-bit kernels due to an information
leak.  However, it does seem that people are genuinely using Wine to
run old 16-bit Windows programs on Linux.

A proper fix for this ("espfix64") is coming in the upcoming merge
window, but as a temporary fix, create a sysctl to allow the
administrator to re-enable support for 16-bit segments.

It adds a "/proc/sys/abi/ldt16" sysctl that defaults to zero (off). If
you hit this issue and care about your old Windows program more than
you care about a kernel stack address information leak, you can do

   echo 1 > /proc/sys/abi/ldt16

as root (add it to your startup scripts), and you should be ok.

The sysctl table is only added if you have COMPAT support enabled on
x86-64, but I assume anybody who runs old windows binaries very much
does that ;)

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Link: http://lkml.kernel.org/r/CA%2B55aFw9BPoD10U1LfHbOMpHWZkvJTkMcfCs9s3urPr1YyWBxw@mail.gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-07 13:25:38 -07:00
..
boot x86/efi: Correct EFI boot stub use of code32_start 2014-05-06 07:55:30 -07:00
configs x86: Default to ARCH=x86 to avoid overriding CONFIG_64BIT 2012-12-20 14:37:18 -08:00
crypto crypto: ghash-clmulni-intel - use C implementation for setkey() 2014-04-14 06:42:19 -07:00
ia32 Introduce [compat_]save_altstack_ex() to unbreak x86 SMAP 2013-09-26 17:18:13 -07:00
include x86, mm, hugetlb: Add missing TLB page invalidation for hugetlb_cow() 2014-06-07 13:25:31 -07:00
kernel x86-64, modify_ldt: Make support for 16-bit segments a runtime option 2014-06-07 13:25:38 -07:00
kvm KVM: VMX: fix use after free of vmx->loaded_vmcs 2014-03-31 09:58:14 -07:00
lguest Merge branch 'x86-paravirt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-04-30 08:41:21 -07:00
lib x86, smap: Handle csum_partial_copy_*_user() 2013-09-26 17:18:13 -07:00
math-emu x86: Rename trap_no to trap_nr in thread_struct 2012-03-13 06:24:09 +01:00
mm x86, smap: smap_violation() is bogus if CONFIG_X86_SMAP is off 2014-02-22 12:41:27 -08:00
net x86: bpf_jit: support negative offsets 2014-03-31 09:58:13 -07:00
oprofile oprofile, x86: Fix wrapping bug in op_x86_get_ctrl() 2012-10-15 14:38:24 +02:00
pci x86/PCI: Map PCI setup data with ioremap() so it can be in highmem 2013-06-05 10:50:04 -06:00
platform x86/efi: Fix off-by-one bug in EFI Boot Services reservation 2014-02-06 11:08:12 -08:00
power x86, gdt, hibernate: Store/load GDT for hibernate path. 2013-05-02 11:27:35 -07:00
realmode x86, build: Pass in additional -mno-mmx, -mno-sse options 2013-12-20 07:45:10 -08:00
syscalls unify compat fanotify_mark(2), switch to COMPAT_SYSCALL_DEFINE 2013-05-09 13:46:38 -04:00
tools x86, relocs: Move __vvar_page from S_ABS to S_REL 2013-06-12 15:14:57 -07:00
um make SYSCALL_DEFINE<n>-generated wrappers do asmlinkage_protect 2013-03-03 22:58:33 -05:00
vdso x86-64, modify_ldt: Make support for 16-bit segments a runtime option 2014-06-07 13:25:38 -07:00
video x86: Use vga_default_device() when determining whether an fb is primary 2012-04-24 09:50:17 +01:00
xen xen: Fix possible user space selector corruption 2014-02-22 12:41:25 -08:00
.gitignore x86/kprobes: Add arch/x86/tools/insn_sanity to .gitignore 2012-01-16 08:21:59 +01:00
Kbuild x86, realmode: realmode.bin infrastructure 2012-05-08 11:41:48 -07:00
Kconfig x86: fix build error and kconfig for ia32_emulation and binfmt 2013-06-18 16:20:32 -05:00
Kconfig.cpu x86, 386 removal: Document Nx586 as a 386 and thus unsupported 2012-11-29 13:28:39 -08:00
Kconfig.debug Kconfig: consolidate CONFIG_DEBUG_STRICT_USER_COPY_CHECKS 2013-04-30 17:04:09 -07:00
Makefile x86, build: Pass in additional -mno-mmx, -mno-sse options 2013-12-20 07:45:10 -08:00
Makefile_32.cpu x86, 386 removal: Remove CONFIG_M386 from Kconfig 2012-11-29 13:23:01 -08:00
Makefile.um um: fix linker script generation 2012-04-09 13:59:00 -04:00