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

Hi,

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

* Time "virtual" syscalls (gettimeofday and clock_gettime). The
  implementation is an adaptation of the arm vDSO (vgettimeofday.c),
  using the same the data page as 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 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.


The last patch requires my Makefile fix [1] to apply. I pushed the
series on top of this patch on pdsw-git:

  git at pdsw-git.cambridge.arm.com:users/kevbro01/linux compat-vdso

I have only tested the series with a 64-bit userspace (+ 32-bit glibc).
Testing it with a 32-bit userspace would be very welcome.

Thanks,
Kevin

[1]: "arm64: fix vdso-offsets.h dependency"
     http://lists.infradead.org/pipermail/linux-arm-kernel/2016-April/422307.html

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                       |  20 +++
 arch/arm64/Makefile                      |  20 ++-
 arch/arm64/include/asm/elf.h             |  13 +-
 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               |   9 +-
 arch/arm64/kernel/asm-offsets.c          |  13 ++
 arch/arm64/kernel/signal32.c             |  61 ++-----
 arch/arm64/kernel/vdso.c                 | 196 +++++++++++++--------
 arch/arm64/kernel/vdso32/Makefile        | 120 +++++++++++++
 arch/arm64/kernel/vdso32/sigreturn.S     |  82 +++++++++
 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, 876 insertions(+), 133 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.8.2

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

end of thread, other threads:[~2016-09-08 14:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-08 13:53 [PATCH 0/8] arm64: Add a compat vDSO Kevin Brodsky
2016-09-08 13:53 ` [PATCH 1/8] arm64: Refactor vDSO setup Kevin Brodsky
2016-09-08 13:53 ` [PATCH 2/8] arm64: compat: Add time-related syscall numbers Kevin Brodsky
2016-09-08 13:53 ` [PATCH 3/8] arm64: compat: Expose offset to registers in sigframes Kevin Brodsky
2016-09-08 13:53 ` [PATCH 4/8] arm64: compat: Add a 32-bit vDSO Kevin Brodsky
2016-09-08 13:53 ` [PATCH 5/8] arm64: compat: 32-bit vDSO setup Kevin Brodsky
2016-09-08 13:53 ` [PATCH 6/8] arm64: elf: Set AT_SYSINFO_EHDR in compat processes Kevin Brodsky
2016-09-08 13:53 ` [PATCH 7/8] arm64: compat: Use vDSO sigreturn trampolines if available Kevin Brodsky
2016-09-08 13:53 ` [PATCH 8/8] arm64: Wire up and expose the new compat vDSO Kevin Brodsky
2016-09-08 14:00 ` [PATCH 0/8] arm64: Add a " 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.