All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/30] RFC: x32 support
@ 2012-02-20  0:07 H. Peter Anvin
  2012-02-20  0:07 ` [PATCH 01/30] x86: Factor out TIF_IA32 from 32-bit address space H. Peter Anvin
                   ` (36 more replies)
  0 siblings, 37 replies; 109+ messages in thread
From: H. Peter Anvin @ 2012-02-20  0:07 UTC (permalink / raw)
  To: linux-kernel, linux-arch; +Cc: mingo, tglx, hpa, torvalds, akpm, hjl.tools

This is an initial RFC patchset for x32 support.  This is largely
complete and should be able to boot an x32 userspace.

The patch authors are assigned to myself and H. J. in a somewhat
haphazard fashion; the kernel side of x32 was very much a
collaborative effort, although H. J. ended up doing most of the latter
coding due to my being occupied with kernel.org in late 2011.

This patchset applies on top of tip:core/types which in turn is based
on v3.3-rc3; there may be some trivially resolved conflicts with -rc4.
I am planning to push this out as tip:x86/x32 after the RFC.

Controversial issue in this patchset:

There are a lot of ABIs that expose "long" or "unsigned long"; the
traditional way to deal with that is compat, but we don't want to use
that in most cases for x32.  As a result, I have introduced
__kernel_[u]long_t as an additional type in posix_types.h.

This type largely duplicates __kernel_[s]size_t, but the latter is
defined as [unsigned] int on a lot of platforms, so changing types
over to __kernel_[s]size_t would have changed the type, if not the
size, on a lot of platforms.  I have personally no strong opinion on
which way is preferrable.

The use of a flag to signal x32 rather than using a completely new set
of system call numbers.  This was discussed back in August.

Incompleteness:

There are a number of (especially) ioctl paths which don't yet handle
a 64-bit time_t in the compat path.  This is necessary because of
Linus' (quite correct) dictat that new ABIs should use a 64-bit
time_t, but this also means this is the first 32-bit ABI with a 64-bit
time_t, and some problems are expected to crop up.

The header-exported ABI is not correct everywhere yet.


The total diffstat is attached.

 arch/x86/Kconfig                       |   21 +-
 arch/x86/ia32/ia32_signal.c            |   12 +-
 arch/x86/ia32/sys_ia32.c               |   40 ---
 arch/x86/include/asm/Kbuild            |    2 +
 arch/x86/include/asm/compat.h          |   39 ++-
 arch/x86/include/asm/elf.h             |   29 ++-
 arch/x86/include/asm/ia32.h            |    9 +
 arch/x86/include/asm/posix_types.h     |    4 +-
 arch/x86/include/asm/posix_types_x32.h |   19 +
 arch/x86/include/asm/processor.h       |   10 +-
 arch/x86/include/asm/ptrace.h          |    1 -
 arch/x86/include/asm/sigcontext.h      |   57 ++--
 arch/x86/include/asm/sigframe.h        |   13 +
 arch/x86/include/asm/sighandling.h     |   24 ++
 arch/x86/include/asm/sys_ia32.h        |    7 +-
 arch/x86/include/asm/syscall.h         |    5 +-
 arch/x86/include/asm/thread_info.h     |    6 +-
 arch/x86/include/asm/unistd.h          |   15 +-
 arch/x86/kernel/asm-offsets_64.c       |    6 +
 arch/x86/kernel/cpu/perf_event.c       |    4 +-
 arch/x86/kernel/entry_64.S             |   44 +++
 arch/x86/kernel/process_64.c           |   25 +-
 arch/x86/kernel/signal.c               |  138 +++++++-
 arch/x86/kernel/sys_x86_64.c           |    6 +-
 arch/x86/kernel/syscall_64.c           |    8 +
 arch/x86/oprofile/backtrace.c          |    2 +-
 arch/x86/syscalls/Makefile             |   19 +-
 arch/x86/syscalls/syscall_32.tbl       |    2 +-
 arch/x86/syscalls/syscall_64.tbl       |  579 +++++++++++++++++---------------
 arch/x86/um/sys_call_table_64.c        |    3 +
 arch/x86/um/user-offsets.c             |    2 +
 arch/x86/vdso/.gitignore               |    2 +
 arch/x86/vdso/Makefile                 |   46 +++-
 arch/x86/vdso/vdso32-setup.c           |    6 +
 arch/x86/vdso/vdsox32.S                |   22 ++
 arch/x86/vdso/vdsox32.lds.S            |   32 ++
 arch/x86/vdso/vma.c                    |   78 ++++-
 drivers/char/lp.c                      |   20 +-
 drivers/input/input-compat.c           |    4 +-
 drivers/input/input-compat.h           |    2 +-
 fs/binfmt_elf.c                        |   24 ++-
 fs/compat.c                            |   26 ++-
 include/asm-generic/posix_types.h      |   23 +-
 include/linux/Kbuild                   |    1 +
 include/linux/aio_abi.h                |    2 +-
 include/linux/compat.h                 |    4 +
 include/linux/kernel.h                 |   21 +-
 include/linux/sysinfo.h                |   24 ++
 net/bluetooth/hci_sock.c               |    3 +-
 49 files changed, 1027 insertions(+), 464 deletions(-)
 
It is probably worth noting that this work directly spawned the
x86/syscall and core/types cleanups:

 33 files changed, 1075 insertions(+), 1978 deletions(-)
 22 files changed, 190 insertions(+), 1588 deletions(-)

^ permalink raw reply	[flat|nested] 109+ messages in thread

end of thread, other threads:[~2012-04-24  1:19 UTC | newest]

Thread overview: 109+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-20  0:07 [PATCH 00/30] RFC: x32 support H. Peter Anvin
2012-02-20  0:07 ` [PATCH 01/30] x86: Factor out TIF_IA32 from 32-bit address space H. Peter Anvin
2012-02-20  0:07 ` [PATCH 02/30] x86-64: Use explicit sizes in sigcontext.h, prepare for x32 H. Peter Anvin
2012-02-20  0:51   ` Linus Torvalds
2012-02-20  0:56     ` H. Peter Anvin
2012-02-22 12:22       ` Arnd Bergmann
2012-02-22 18:14         ` H. Peter Anvin
2012-02-22 21:23           ` Arnd Bergmann
2012-02-22 21:55             ` H. Peter Anvin
2012-02-24  2:33             ` H. Peter Anvin
2012-03-06  5:25               ` H. Peter Anvin
2012-02-20  0:07 ` [PATCH 03/30] sysinfo: Move struct sysinfo to a separate header file H. Peter Anvin
2012-02-20  0:07 ` [PATCH 04/30] posix_types: Introduce __kernel_[u]long_t H. Peter Anvin
2012-02-20  0:07 ` [PATCH 05/30] x32: Create posix_types_x32.h H. Peter Anvin
2012-02-20  0:07 ` [PATCH 06/30] sysinfo: Use explicit types in <linux/sysinfo.h> H. Peter Anvin
2012-02-20 12:12   ` Geert Uytterhoeven
2012-02-20 17:29     ` H. Peter Anvin
2012-02-20 20:01       ` Geert Uytterhoeven
2012-02-20 20:44         ` H. Peter Anvin
2012-02-20  0:07 ` [PATCH 07/30] compat: Introduce COMPAT_USE_64BIT_TIME H. Peter Anvin
2012-02-20  0:07 ` [PATCH 08/30] compat: Use COMPAT_USE_64BIT_TIME in the lp driver H. Peter Anvin
2012-02-20  0:56   ` Linus Torvalds
2012-02-20  0:59     ` H. Peter Anvin
2012-02-20  2:22     ` [PATCH 0/7] COMPAT_USE_64BIT_TIME v2 H. Peter Anvin
2012-02-20  2:22       ` [PATCH 1/7] compat: Introduce COMPAT_USE_64BIT_TIME H. Peter Anvin
2012-02-20  2:22       ` [PATCH 2/7] compat: Add helper functions to read/write struct timeval, timespec H. Peter Anvin
2012-02-20  2:22       ` [PATCH 3/7] compat: Handle COMPAT_USE_64BIT_TIME in the lp driver H. Peter Anvin
2012-02-20  2:22       ` [PATCH 4/7] compat: Use COMPAT_USE_64BIT_TIME in the input subsystem H. Peter Anvin
2012-02-20  2:22       ` [PATCH 5/7] compat: Use COMPAT_USE_64BIT_TIME in the Bluetooth subsystem H. Peter Anvin
2012-02-20  2:22       ` [PATCH 6/7] compat: Use COMPAT_USE_64BIT_TIME in net/compat.c H. Peter Anvin
2012-02-20  2:22       ` [PATCH 7/7] compat: Handle COMPAT_USE_64BIT_TIME in net/socket.c H. Peter Anvin
2012-02-20  2:42       ` [PATCH 0/7] COMPAT_USE_64BIT_TIME v2 H. Peter Anvin
2012-02-20  6:22         ` H. Peter Anvin
2012-02-20  0:07 ` [PATCH 09/30] compat: Use COMPAT_USE_64BIT_TIME in the input subsystem H. Peter Anvin
2012-02-20  0:07 ` [PATCH 10/30] compat: Use COMPAT_USE_64BIT_TIME in the Bluetooth subsystem H. Peter Anvin
2012-02-21 19:05   ` Gustavo Padovan
2012-02-21 19:15     ` H. Peter Anvin
2012-02-22 13:47     ` Jiri Kosina
2012-02-22 14:45       ` Gustavo Padovan
2012-02-20  0:07 ` [PATCH 11/30] aio: Use __kernel_ulong_t to define aio_context_t H. Peter Anvin
2012-02-20  0:07 ` [PATCH 12/30] compat: Create compat_sys_p{read,write}v64 H. Peter Anvin
2012-02-20  0:07 ` [PATCH 13/30] elf: Allow core dump-related fields to be overridden H. Peter Anvin
2012-02-20  0:07 ` [PATCH 14/30] x86-64: Add prototype for old_rsp to a header file H. Peter Anvin
2012-02-20  0:07 ` [PATCH 15/30] x32: Add a thread flag for x32 processes H. Peter Anvin
2012-02-20  0:07 ` [PATCH 16/30] x86-64, ia32: Drop sys32_rt_sigprocmask H. Peter Anvin
2012-02-20  0:07 ` [PATCH 17/30] x32: Add x32 system calls to syscall/syscall_64.tbl H. Peter Anvin
2012-02-20  0:07 ` [PATCH 18/30] x32: Generate <asm/unistd_x32.h> H. Peter Anvin
2012-02-20  0:07 ` [PATCH 19/30] x32: Generate <asm/unistd_64_x32.h> H. Peter Anvin
2012-02-20  0:07 ` [PATCH 20/30] x86: Move some signal-handling definitions to a common header H. Peter Anvin
2012-02-20  0:07 ` [PATCH 21/30] x32: Export setup/restore_sigcontext from signal.c H. Peter Anvin
2012-02-20  0:08 ` [PATCH 22/30] x32: Add struct ucontext_x32 H. Peter Anvin
2012-02-20  0:08 ` [PATCH 23/30] x32: Add rt_sigframe_x32 H. Peter Anvin
2012-02-20  0:08 ` [PATCH 24/30] x32: Handle the x32 system call flag H. Peter Anvin
2012-02-20  0:08 ` [PATCH 25/30] x86: Add #ifdef CONFIG_COMPAT to <asm/sys_ia32.h> H. Peter Anvin
2012-02-20  0:08 ` [PATCH 26/30] x32: Signal-related system calls H. Peter Anvin
2012-02-20  0:08 ` [PATCH 27/30] x32: Handle process creation H. Peter Anvin
2012-02-20  0:08 ` [PATCH 28/30] x32: If configured, add x32 system calls to system call tables H. Peter Anvin
2012-02-20  0:08 ` [PATCH 29/30] x32: Allow x32 to be configured H. Peter Anvin
2012-02-20  0:08 ` [PATCH 30/30] x32: Add x32 VDSO support H. Peter Anvin
2012-02-21  0:12   ` Andy Lutomirski
2012-02-21  3:58     ` H. Peter Anvin
2012-02-21 16:52       ` Andrew Lutomirski
2012-02-21 17:51         ` H. Peter Anvin
2012-02-21 18:54           ` Andrew Lutomirski
2012-02-21 19:03             ` H. Peter Anvin
2012-02-21 19:29               ` Andrew Lutomirski
2012-02-21 19:37                 ` H. Peter Anvin
2012-02-21 19:40                   ` Andrew Lutomirski
2012-02-21 19:49                     ` H. Peter Anvin
2012-02-21 19:51                       ` Andrew Lutomirski
2012-02-21 19:56                         ` H. Peter Anvin
2012-02-23  4:49     ` [tip:x86/x32] x32: Drop non-__vdso weak symbols from the x32 VDSO tip-bot for H. Peter Anvin
2012-02-23 10:55       ` Ingo Molnar
2012-02-23 14:36         ` H. Peter Anvin
2012-02-27 22:21 ` [tip:x86/x32] x32: Warn and disable rather than error if binutils too old tip-bot for H. Peter Anvin
2012-02-27 22:49   ` Fwd: " H. Peter Anvin
2012-02-27 22:51     ` H. Peter Anvin
2012-02-28  7:21     ` Sam Ravnborg
2012-02-28  9:49 ` [tip:x86/x32] x86/x32: Fix the binutils auto-detect tip-bot for Ingo Molnar
2012-03-06  0:56 ` [tip:x86/x32] x32: Provide separate is_ia32_task() and is_x32_task () predicates tip-bot for H. Peter Anvin
2012-03-06  0:56 ` [tip:x86/x32] x32: Switch to a 64-bit clock_t tip-bot for H. Peter Anvin
2012-03-06  0:57 ` [tip:x86/x32] x32: Add ptrace for x32 tip-bot for H.J. Lu
2012-03-14  5:58 ` [tip:x86/x32] x32: Fix stupid ia32/ x32 inversion in the siginfo format tip-bot for H. Peter Anvin
2012-03-14 21:43 ` [tip:x86/x32] x32: Fix alignment fail in struct compat_siginfo tip-bot for H. Peter Anvin
2012-03-14 23:17   ` H.J. Lu
2012-03-14 23:19     ` H. Peter Anvin
2012-03-15  0:33       ` H.J. Lu
2012-03-14 23:33     ` Derek Fawcus
2012-03-14 23:44       ` H. Peter Anvin
2012-04-18 17:38   ` H.J. Lu
2012-04-18 17:47     ` H. Peter Anvin
2012-04-18 18:01       ` H.J. Lu
2012-04-18 18:10         ` H. Peter Anvin
2012-04-18 18:15           ` H.J. Lu
2012-04-18 18:21             ` H. Peter Anvin
2012-04-18 18:33               ` H.J. Lu
2012-04-18 19:03                 ` H. Peter Anvin
2012-04-18 21:24                 ` H. Peter Anvin
2012-04-18 21:49                   ` H.J. Lu
2012-04-18 21:58                     ` H. Peter Anvin
2012-04-18 22:58                       ` H.J. Lu
2012-04-18 22:55                   ` H.J. Lu
2012-04-18 23:48                     ` H. Peter Anvin
2012-04-18 23:54                       ` H.J. Lu
2012-04-19  0:09                         ` H. Peter Anvin
2012-04-19  0:14                           ` H.J. Lu
2012-04-23 23:49     ` [tip:x86/urgent] asm-generic: Allow overriding clock_t and add attributes to siginfo_t tip-bot for H. Peter Anvin
2012-04-23 23:50     ` [tip:x86/urgent] x32, siginfo: Provide proper overrides for x32 siginfo_t tip-bot for H. Peter Anvin
2012-04-24  1:19     ` tip-bot for H. Peter Anvin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.