All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH v1 00/19] powerpc: Switch signal 32 to using user_access_begin() and friends
@ 2020-08-12 12:05 ` Christophe Leroy
  0 siblings, 0 replies; 42+ messages in thread
From: Christophe Leroy @ 2020-08-12 12:05 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman, ldv, viro
  Cc: linux-kernel, linuxppc-dev

This series replaces copies to users by unsafe_put_user() and friends
with user_write_access_begin() dance in signal32.

The advantages are:
- No KUAP unlock/lock at every copy
- More readable code.
- Better generated code.

Copying Al Viro who did it on x86 and may have suggestions,
and Dmitry V. Levin who introduced put_compat_sigset()

Christophe Leroy (19):
  powerpc/signal: Move inline functions in signal.h
  powerpc/ptrace: Move declaration of ptrace_get_reg() and
    ptrace_set_reg()
  powerpc/ptrace: Consolidate reg index calculation
  powerpc/ptrace: Create ptrace_get_fpr() and ptrace_put_fpr()
  powerpc/signal: Don't manage floating point regs when no FPU
  powerpc/32s: Allow deselecting CONFIG_PPC_FPU on mpc832x
  powerpc/signal: Move access_ok() out of get_sigframe()
  powerpc/signal: Remove get_clean_sp()
  powerpc/signal: Call get_tm_stackpointer() from get_sigframe()
  powerpc/signal: Refactor bad frame logging
  powerpc/signal32: Simplify logging in handle_rt_signal32()
  powerpc/signal32: Regroup copies in save_user_regs() and
    save_tm_user_regs()
  powerpc/signal32: Create 'unsafe' versions of
    copy_[ck][fpr/vsx]_to_user()
  powerpc/signal32: Switch save_user_regs() and save_tm_user_regs() to
    user_access_begin() logic
  powerpc/signal32: Switch handle_signal32() to user_access_begin()
    logic
  powerpc/signal32: Switch handle_rt_signal32() to user_access_begin()
    logic
  signal: Add unsafe_put_compat_sigset()
  powerpc/signal32: Add and use unsafe_put_sigset_t()
  powerpc/signal32: Switch swap_context() to user_access_begin() logic

 arch/powerpc/Kconfig                     |   1 +
 arch/powerpc/include/asm/processor.h     |  16 +-
 arch/powerpc/include/asm/ptrace.h        |   6 -
 arch/powerpc/kernel/asm-offsets.c        |   2 +
 arch/powerpc/kernel/process.c            |   4 +
 arch/powerpc/kernel/ptrace/Makefile      |   3 +-
 arch/powerpc/kernel/ptrace/ptrace-decl.h |  21 ++
 arch/powerpc/kernel/ptrace/ptrace-fpu.c  |  40 +++
 arch/powerpc/kernel/ptrace/ptrace-view.c |   2 +
 arch/powerpc/kernel/ptrace/ptrace.c      |  54 +---
 arch/powerpc/kernel/signal.c             |  59 ++--
 arch/powerpc/kernel/signal.h             | 109 ++++++-
 arch/powerpc/kernel/signal_32.c          | 386 ++++++++++++-----------
 arch/powerpc/kernel/signal_64.c          |  19 +-
 arch/powerpc/kernel/traps.c              |   2 +
 arch/powerpc/platforms/Kconfig.cputype   |  15 +-
 include/linux/compat.h                   |  32 ++
 17 files changed, 462 insertions(+), 309 deletions(-)
 create mode 100644 arch/powerpc/kernel/ptrace/ptrace-fpu.c

-- 
2.25.0


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

end of thread, other threads:[~2020-08-12 15:47 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-12 12:05 [RFC PATCH v1 00/19] powerpc: Switch signal 32 to using user_access_begin() and friends Christophe Leroy
2020-08-12 12:05 ` Christophe Leroy
2020-08-12 12:05 ` [RFC PATCH v1 01/19] powerpc/signal: Move inline functions in signal.h Christophe Leroy
2020-08-12 12:05   ` Christophe Leroy
2020-08-12 12:05 ` [RFC PATCH v1 02/19] powerpc/ptrace: Move declaration of ptrace_get_reg() and ptrace_set_reg() Christophe Leroy
2020-08-12 12:05   ` Christophe Leroy
2020-08-12 15:47   ` kernel test robot
2020-08-12 12:05 ` [RFC PATCH v1 03/19] powerpc/ptrace: Consolidate reg index calculation Christophe Leroy
2020-08-12 12:05   ` Christophe Leroy
2020-08-12 12:05 ` [RFC PATCH v1 04/19] powerpc/ptrace: Create ptrace_get_fpr() and ptrace_put_fpr() Christophe Leroy
2020-08-12 12:05   ` Christophe Leroy
2020-08-12 12:05 ` [RFC PATCH v1 05/19] powerpc/signal: Don't manage floating point regs when no FPU Christophe Leroy
2020-08-12 12:05   ` Christophe Leroy
2020-08-12 12:05 ` [RFC PATCH v1 06/19] powerpc/32s: Allow deselecting CONFIG_PPC_FPU on mpc832x Christophe Leroy
2020-08-12 12:05   ` Christophe Leroy
2020-08-12 12:05 ` [RFC PATCH v1 07/19] powerpc/signal: Move access_ok() out of get_sigframe() Christophe Leroy
2020-08-12 12:05   ` Christophe Leroy
2020-08-12 12:05 ` [RFC PATCH v1 08/19] powerpc/signal: Remove get_clean_sp() Christophe Leroy
2020-08-12 12:05   ` Christophe Leroy
2020-08-12 12:06 ` [RFC PATCH v1 09/19] powerpc/signal: Call get_tm_stackpointer() from get_sigframe() Christophe Leroy
2020-08-12 12:06   ` Christophe Leroy
2020-08-12 12:06 ` [RFC PATCH v1 10/19] powerpc/signal: Refactor bad frame logging Christophe Leroy
2020-08-12 12:06   ` Christophe Leroy
2020-08-12 12:06 ` [RFC PATCH v1 11/19] powerpc/signal32: Simplify logging in handle_rt_signal32() Christophe Leroy
2020-08-12 12:06   ` Christophe Leroy
2020-08-12 12:06 ` [RFC PATCH v1 12/19] powerpc/signal32: Regroup copies in save_user_regs() and save_tm_user_regs() Christophe Leroy
2020-08-12 12:06   ` Christophe Leroy
2020-08-12 12:06 ` [RFC PATCH v1 13/19] powerpc/signal32: Create 'unsafe' versions of copy_[ck][fpr/vsx]_to_user() Christophe Leroy
2020-08-12 12:06   ` Christophe Leroy
2020-08-12 12:06 ` [RFC PATCH v1 14/19] powerpc/signal32: Switch save_user_regs() and save_tm_user_regs() to user_access_begin() logic Christophe Leroy
2020-08-12 12:06   ` Christophe Leroy
2020-08-12 12:06 ` [RFC PATCH v1 15/19] powerpc/signal32: Switch handle_signal32() " Christophe Leroy
2020-08-12 12:06   ` Christophe Leroy
2020-08-12 12:06 ` [RFC PATCH v1 16/19] powerpc/signal32: Switch handle_rt_signal32() " Christophe Leroy
2020-08-12 12:06   ` Christophe Leroy
2020-08-12 12:06 ` [RFC PATCH v1 17/19] signal: Add unsafe_put_compat_sigset() Christophe Leroy
2020-08-12 12:06   ` Christophe Leroy
2020-08-12 12:06 ` [RFC PATCH v1 18/19] powerpc/signal32: Add and use unsafe_put_sigset_t() Christophe Leroy
2020-08-12 12:06   ` Christophe Leroy
2020-08-12 14:01   ` kernel test robot
2020-08-12 12:06 ` [RFC PATCH v1 19/19] powerpc/signal32: Switch swap_context() to user_access_begin() logic Christophe Leroy
2020-08-12 12:06   ` Christophe Leroy

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.