All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH v2 0/8] arm64: Add a compat vDSO
@ 2016-10-27 16:30 Kevin Brodsky
  2016-10-27 16:30 ` [RFC PATCH v2 1/8] arm64: Refactor vDSO setup Kevin Brodsky
                   ` (7 more replies)
  0 siblings, 8 replies; 19+ messages in thread
From: Kevin Brodsky @ 2016-10-27 16:30 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

This series adds support for a compat (AArch32) vDSO, providing two
userspace functionalities to compat processes:

* "Virtual" time syscalls (gettimeofday and clock_gettime). The
  implementation is an adaptation of the arm vDSO (vgettimeofday.c),
  sharing the data page with the 64-bit vDSO.

* sigreturn trampolines, following the example of the 64-bit vDSO
  (sigreturn.S), but slightly more complicated because we provide A32
  and T32 variants for both sigreturn and rt_sigreturn.

The first point brings the performance improvement expected of a vDSO,
by implementing time syscalls directly in userspace. The second point
allows us to get rid of the compat vector page, at the expense of the
kuser helpers (this is one reason for not enabling the compat vDSO by
default).

Unfortunately, this time we cannot escape using a 32-bit toolchain. To
build the compat VDSO, CONFIG_COMPAT_VDSO must be set *and*
CROSS_COMPILE_ARM32 must be defined to the prefix of a 32-bit compiler.
Failure to do so will not prevent building the kernel, but a warning
will be printed and the compat vDSO will not be built.

Thanks,
Kevin

Changelog v1..v2:
* Rebased on 4.9-rc2. I preserved the spirit of 5a9e3e156ec1 ("arm64:
  apply __ro_after_init to some objects") by making the new
  vdso{,32}_mappings static variables __ro_after_init, and removing
  pages from struct vdso_mappings.
* Added CONFIG_CROSS_COMPILE_ARM32, on the same principle as
  CONFIG_CROSS_COMPILE. That may help avoid forgetting to set the
  variable when building the kernel with CONFIG_COMPAT_VDSO.


Kevin Brodsky (8):
  arm64: Refactor vDSO setup
  arm64: compat: Add time-related syscall numbers
  arm64: compat: Expose offset to registers in sigframes
  arm64: compat: Add a 32-bit vDSO
  arm64: compat: 32-bit vDSO setup
  arm64: elf: Set AT_SYSINFO_EHDR in compat processes
  arm64: compat: Use vDSO sigreturn trampolines if available
  arm64: Wire up and expose the new compat vDSO

 arch/arm64/Kconfig                       |  26 +++
 arch/arm64/Makefile                      |  28 ++-
 arch/arm64/include/asm/elf.h             |  15 +-
 arch/arm64/include/asm/signal32.h        |  46 +++++
 arch/arm64/include/asm/unistd.h          |   2 +
 arch/arm64/include/asm/vdso.h            |   3 +
 arch/arm64/kernel/Makefile               |   8 +-
 arch/arm64/kernel/asm-offsets.c          |  13 ++
 arch/arm64/kernel/signal32.c             |  61 ++-----
 arch/arm64/kernel/vdso.c                 | 199 ++++++++++++---------
 arch/arm64/kernel/vdso32/Makefile        | 121 +++++++++++++
 arch/arm64/kernel/vdso32/sigreturn.S     |  86 +++++++++
 arch/arm64/kernel/vdso32/vdso.S          |  32 ++++
 arch/arm64/kernel/vdso32/vdso.lds.S      |  98 +++++++++++
 arch/arm64/kernel/vdso32/vgettimeofday.c | 294 +++++++++++++++++++++++++++++++
 15 files changed, 897 insertions(+), 135 deletions(-)
 create mode 100644 arch/arm64/kernel/vdso32/Makefile
 create mode 100644 arch/arm64/kernel/vdso32/sigreturn.S
 create mode 100644 arch/arm64/kernel/vdso32/vdso.S
 create mode 100644 arch/arm64/kernel/vdso32/vdso.lds.S
 create mode 100644 arch/arm64/kernel/vdso32/vgettimeofday.c

-- 
2.10.0

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

end of thread, other threads:[~2016-12-01 14:27 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-27 16:30 [RFC PATCH v2 0/8] arm64: Add a compat vDSO Kevin Brodsky
2016-10-27 16:30 ` [RFC PATCH v2 1/8] arm64: Refactor vDSO setup Kevin Brodsky
2016-10-27 16:30 ` [RFC PATCH v2 2/8] arm64: compat: Add time-related syscall numbers Kevin Brodsky
2016-10-27 16:30 ` [RFC PATCH v2 3/8] arm64: compat: Expose offset to registers in sigframes Kevin Brodsky
2016-10-27 16:30 ` [RFC PATCH v2 4/8] arm64: compat: Add a 32-bit vDSO Kevin Brodsky
2016-10-28  3:09   ` Jisheng Zhang
2016-10-28 10:20     ` Kevin Brodsky
2016-11-04 20:03       ` Catalin Marinas
2016-11-21 15:45         ` Kevin Brodsky
2016-11-21 18:44           ` Catalin Marinas
2016-12-01 14:27             ` Kevin Brodsky
2016-10-27 16:30 ` [RFC PATCH v2 5/8] arm64: compat: 32-bit vDSO setup Kevin Brodsky
2016-10-27 16:30 ` [RFC PATCH v2 6/8] arm64: elf: Set AT_SYSINFO_EHDR in compat processes Kevin Brodsky
2016-10-27 16:30 ` [RFC PATCH v2 7/8] arm64: compat: Use vDSO sigreturn trampolines if available Kevin Brodsky
2016-10-27 16:30 ` [RFC PATCH v2 8/8] arm64: Wire up and expose the new compat vDSO Kevin Brodsky
2016-11-04 15:50   ` Catalin Marinas
2016-11-04 16:30     ` Kevin Brodsky
2016-11-04 16:47       ` Catalin Marinas
2016-11-04 17:53         ` Kevin Brodsky

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.