From: Linus Torvalds Date: Fri, 30 Mar 2012 01:12:23 +0000 (-0700) Subject: Merge branch 'x86-x32-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git... X-Git-Tag: MMI-PSA29.97-13-9~17115 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a591afc01d9e48affbacb365558a31e53c85af45;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git Merge branch 'x86-x32-for-linus' of git://git./linux/kernel/git/tip/tip Pull x32 support for x86-64 from Ingo Molnar: "This tree introduces the X32 binary format and execution mode for x86: 32-bit data space binaries using 64-bit instructions and 64-bit kernel syscalls. This allows applications whose working set fits into a 32 bits address space to make use of 64-bit instructions while using a 32-bit address space with shorter pointers, more compressed data structures, etc." Fix up trivial context conflicts in arch/x86/{Kconfig,vdso/vma.c} * 'x86-x32-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (71 commits) x32: Fix alignment fail in struct compat_siginfo x32: Fix stupid ia32/x32 inversion in the siginfo format x32: Add ptrace for x32 x32: Switch to a 64-bit clock_t x32: Provide separate is_ia32_task() and is_x32_task() predicates x86, mtrr: Use explicit sizing and padding for the 64-bit ioctls x86/x32: Fix the binutils auto-detect x32: Warn and disable rather than error if binutils too old x32: Only clear TIF_X32 flag once x32: Make sure TS_COMPAT is cleared for x32 tasks fs: Remove missed ->fds_bits from cessation use of fd_set structs internally fs: Fix close_on_exec pointer in alloc_fdtable x32: Drop non-__vdso weak symbols from the x32 VDSO x32: Fix coding style violations in the x32 VDSO code x32: Add x32 VDSO support x32: Allow x32 to be configured x32: If configured, add x32 system calls to system call tables x32: Handle process creation x32: Signal-related system calls x86: Add #ifdef CONFIG_COMPAT to ... --- a591afc01d9e48affbacb365558a31e53c85af45 diff --cc arch/x86/Kconfig index abfb953c131d,e2b38b4bffdc..1d14cc6b79ad --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@@ -2173,10 -2175,22 +2173,23 @@@ config IA32_AOU ---help--- Support old a.out binaries in the 32bit emulation. + config X86_X32 + bool "x32 ABI for 64-bit mode (EXPERIMENTAL)" + depends on X86_64 && IA32_EMULATION && EXPERIMENTAL + ---help--- + Include code to run binaries for the x32 native 32-bit ABI + for 64-bit processors. An x32 process gets access to the + full 64-bit register file and wide data path while leaving + pointers at 32 bits for smaller memory footprint. + + You will need a recent binutils (2.22 or later) with + elf32_x86_64 support enabled to compile a kernel with this + option set. + config COMPAT def_bool y - depends on IA32_EMULATION + depends on IA32_EMULATION || X86_X32 + select ARCH_WANT_OLD_COMPAT_IPC config COMPAT_FOR_U64_ALIGNMENT def_bool COMPAT diff --cc arch/x86/kernel/cpu/perf_event.c index fa2900c0e398,63c0e058a405..40883ffe2da9 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c @@@ -29,10 -28,8 +29,9 @@@ #include #include #include - #include #include #include +#include #include "perf_event.h" diff --cc arch/x86/kernel/signal.c index 25edcfc9ba5b,c3846b6fb726..5134e17855f0 --- a/arch/x86/kernel/signal.c +++ b/arch/x86/kernel/signal.c @@@ -24,9 -22,9 +22,10 @@@ #include #include #include +#include #include #include + #include #ifdef CONFIG_X86_64 #include diff --cc arch/x86/vdso/vma.c index 17e18279649f,d7dce1dbf8c9..00aaf047b39f --- a/arch/x86/vdso/vma.c +++ b/arch/x86/vdso/vma.c @@@ -122,10 -170,11 +170,10 @@@ static int setup_additional_pages(struc current->mm->context.vdso = (void *)addr; - ret = install_special_mapping(mm, addr, vdso_size, + ret = install_special_mapping(mm, addr, size, VM_READ|VM_EXEC| - VM_MAYREAD|VM_MAYWRITE|VM_MAYEXEC| - VM_ALWAYSDUMP, + VM_MAYREAD|VM_MAYWRITE|VM_MAYEXEC, - vdso_pages); + pages); if (ret) { current->mm->context.vdso = NULL; goto up_fail;