LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [REVIEW][PATCH 00/17] siginfo bugfixes and cleanups
@ 2018-04-20  1:01 Eric W. Biederman
  2018-04-20  1:03 ` [REVIEW][PATCH 01/17] signal/alpha: Document a conflict with SI_USER for SIGFPE Eric W. Biederman
                   ` (17 more replies)
  0 siblings, 18 replies; 77+ messages in thread
From: Eric W. Biederman @ 2018-04-20  1:01 UTC (permalink / raw)
  To: linux-arch
  Cc: linux-kernel, linux-api, Helge Deller, Richard Henderson,
	Ivan Kokshaysky, Matt Turner, David Miller, Yoshinori Sato,
	Rich Felker, Paul Mundt, Vincent Chen, Greentime Hu,
	Arnd Bergmann, Tony Luck, Fenghua Yu, Paul Mackerras, Kumar Gala,
	Michael Ellerman, Benjamin Herrenschmidt, Guan Xuetao


Mostly this dealing with aliases of SI_USER, that make it impossible for
userspace to tell what kind of siginfo it has received.

Also in this series is the change to ensure we have siginfo initialized
so I can rip out the switch in copy_siginfo_to_user for better
performance, and to ensure better backwards compatibility as siginfo as
generated in the callers is passed to userspace.

There are also fixes for a few other siginfo bugs I have found.

There are cleanups of ifdefs on SEGV_BNDERR and BUS_MCERR_AX that are no
longer necessary.

I plan to merge these bug fixes through my siginfo tree, but if you
object to them or would prefer to have them go through your arch tree
please let me know.

The changes are avaiable as a totality at:
    git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git siginfo-review
    
Dmitry V. Levin (1):
      sparc: fix compat siginfo ABI regression

Eric W. Biederman (16):
      signal/alpha: Document a conflict with SI_USER for SIGFPE
      signal/sh: Use force_sig_fault in hw_breakpoint_handler
      signal/nds32: Use force_sig in unhandled_interruption and unhandled_exceptions
      signal/nds32: Use force_sig(SIGILL) in do_revisn
      signal: Ensure every siginfo we send has all bits initialized
      signal: Reduce copy_siginfo_to_user to just copy_to_user
      signal: Stop special casing TRAP_FIXME and FPE_FIXME in siginfo_layout
      signal: Remove SEGV_BNDERR ifdefs
      signal: Remove ifdefs for BUS_MCEERR_AR and BUS_MCEERR_AO
      signal/alpha: Replace FPE_FIXME with FPE_FLTUNK
      signal/ia64: Replace FPE_FIXME with FPE_FLTUNK
      signal/powerpc: Replace FPE_FIXME with FPE_FLTUNK
      signal/unicore32: Use FPE_FLTUNK instead of 0 in ucf64_raise_sigfpe
      signal: Add TRAP_UNK si_code for undiagnosted trap exceptions
      signal/alpha:  Replace TRAP_FIXME with TRAP_UNK
      signal/powerpc: Replace TRAP_FIXME with TRAP_UNK

 arch/alpha/include/uapi/asm/siginfo.h     |  14 ----
 arch/alpha/kernel/osf_sys.c               |   3 +-
 arch/alpha/kernel/signal.c                |   2 +
 arch/alpha/kernel/traps.c                 |  11 ++-
 arch/alpha/mm/fault.c                     |   2 +
 arch/arc/mm/fault.c                       |   2 +
 arch/arm/kernel/ptrace.c                  |   1 +
 arch/arm/kernel/swp_emulate.c             |   1 +
 arch/arm/kernel/traps.c                   |   5 ++
 arch/arm/mm/alignment.c                   |   1 +
 arch/arm/mm/fault.c                       |   4 +
 arch/arm/vfp/vfpmodule.c                  |   3 +-
 arch/arm64/kernel/fpsimd.c                |   2 +-
 arch/arm64/kernel/sys_compat.c            |   1 +
 arch/arm64/kernel/traps.c                 |   1 +
 arch/arm64/mm/fault.c                     |  18 +++--
 arch/c6x/kernel/traps.c                   |   1 +
 arch/hexagon/kernel/traps.c               |   1 +
 arch/hexagon/mm/vm_fault.c                |   1 +
 arch/ia64/include/uapi/asm/siginfo.h      |   7 --
 arch/ia64/kernel/brl_emu.c                |   1 +
 arch/ia64/kernel/signal.c                 |   2 +
 arch/ia64/kernel/traps.c                  |  31 ++++++--
 arch/ia64/kernel/unaligned.c              |   1 +
 arch/ia64/mm/fault.c                      |   4 +-
 arch/m68k/kernel/traps.c                  |   2 +
 arch/microblaze/kernel/exceptions.c       |   1 +
 arch/microblaze/mm/fault.c                |   4 +-
 arch/mips/mm/fault.c                      |   1 +
 arch/nds32/kernel/traps.c                 |  19 ++---
 arch/nds32/mm/fault.c                     |   1 +
 arch/nios2/kernel/traps.c                 |   1 +
 arch/openrisc/kernel/traps.c              |   5 +-
 arch/openrisc/mm/fault.c                  |   1 +
 arch/parisc/kernel/ptrace.c               |   1 +
 arch/parisc/kernel/traps.c                |   2 +
 arch/parisc/kernel/unaligned.c            |   1 +
 arch/parisc/math-emu/driver.c             |   1 +
 arch/parisc/mm/fault.c                    |   1 +
 arch/powerpc/include/uapi/asm/siginfo.h   |  15 ----
 arch/powerpc/kernel/process.c             |   1 +
 arch/powerpc/kernel/traps.c               |  13 ++--
 arch/powerpc/mm/fault.c                   |   1 +
 arch/powerpc/platforms/cell/spufs/fault.c |   2 +-
 arch/riscv/kernel/traps.c                 |   1 +
 arch/s390/kernel/traps.c                  |   5 +-
 arch/s390/mm/fault.c                      |   2 +
 arch/sh/kernel/hw_breakpoint.c            |   9 +--
 arch/sh/kernel/traps_32.c                 |   2 +
 arch/sh/math-emu/math.c                   |   1 +
 arch/sh/mm/fault.c                        |   1 +
 arch/sparc/include/uapi/asm/siginfo.h     |   7 --
 arch/sparc/kernel/process_64.c            |   1 +
 arch/sparc/kernel/sys_sparc_32.c          |   1 +
 arch/sparc/kernel/traps_32.c              |  12 ++-
 arch/sparc/kernel/traps_64.c              |  16 +++-
 arch/sparc/kernel/unaligned_32.c          |   1 +
 arch/sparc/mm/fault_32.c                  |   1 +
 arch/sparc/mm/fault_64.c                  |   1 +
 arch/um/kernel/trap.c                     |   2 +
 arch/unicore32/kernel/fpu-ucf64.c         |   8 +-
 arch/unicore32/mm/fault.c                 |   3 +
 arch/x86/entry/vsyscall/vsyscall_64.c     |   2 +-
 arch/x86/kernel/ptrace.c                  |   2 +-
 arch/x86/kernel/signal_compat.c           |   2 +-
 arch/x86/kernel/traps.c                   |   3 +
 arch/x86/kernel/umip.c                    |   1 +
 arch/x86/kvm/mmu.c                        |   1 +
 arch/x86/mm/fault.c                       |   1 +
 arch/xtensa/kernel/traps.c                |   1 +
 arch/xtensa/mm/fault.c                    |   1 +
 fs/signalfd.c                             |  15 +---
 include/linux/ptrace.h                    |   1 -
 include/linux/tracehook.h                 |   1 +
 include/uapi/asm-generic/siginfo.h        |   3 +-
 kernel/signal.c                           | 123 +++---------------------------
 virt/kvm/arm/mmu.c                        |   1 +
 77 files changed, 194 insertions(+), 231 deletions(-)


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

end of thread, other threads:[~2018-05-30  7:55 UTC | newest]

Thread overview: 77+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-20  1:01 [REVIEW][PATCH 00/17] siginfo bugfixes and cleanups Eric W. Biederman
2018-04-20  1:03 ` [REVIEW][PATCH 01/17] signal/alpha: Document a conflict with SI_USER for SIGFPE Eric W. Biederman
2018-04-20  1:03 ` [REVIEW][PATCH 02/17] sparc: fix compat siginfo ABI regression Eric W. Biederman
2018-04-20  1:03 ` [REVIEW][PATCH 03/17] signal/sh: Use force_sig_fault in hw_breakpoint_handler Eric W. Biederman
2018-04-20  1:03 ` [REVIEW][PATCH 04/17] signal/nds32: Use force_sig in unhandled_interruption and unhandled_exceptions Eric W. Biederman
2018-04-25 12:14   ` Vincent Chen
2018-04-20  1:03 ` [REVIEW][PATCH 05/17] signal/nds32: Use force_sig(SIGILL) in do_revisn Eric W. Biederman
2018-04-25 12:10   ` Vincent Chen
2018-04-25 16:13     ` [PATCH] signal/nds32: More information in do_revinsn Eric W. Biederman
2018-04-26  3:02       ` Vincent Chen
2018-04-20  1:03 ` [REVIEW][PATCH 06/17] signal: Ensure every siginfo we send has all bits initialized Eric W. Biederman
2018-04-20  1:03 ` [REVIEW][PATCH 07/17] signal: Reduce copy_siginfo_to_user to just copy_to_user Eric W. Biederman
2018-04-20  1:03 ` [REVIEW][PATCH 08/17] signal: Stop special casing TRAP_FIXME and FPE_FIXME in siginfo_layout Eric W. Biederman
2018-04-20  1:04 ` [REVIEW][PATCH 09/17] signal: Remove SEGV_BNDERR ifdefs Eric W. Biederman
2018-04-20  1:04 ` [REVIEW][PATCH 10/17] signal: Remove ifdefs for BUS_MCEERR_AR and BUS_MCEERR_AO Eric W. Biederman
2018-04-20  1:04 ` [REVIEW][PATCH 11/17] signal/alpha: Replace FPE_FIXME with FPE_FLTUNK Eric W. Biederman
2018-04-20  1:04 ` [REVIEW][PATCH 12/17] signal/ia64: " Eric W. Biederman
2018-04-20  1:04 ` [REVIEW][PATCH 13/17] signal/powerpc: " Eric W. Biederman
2018-04-20  1:04 ` [REVIEW][PATCH 14/17] signal/unicore32: Use FPE_FLTUNK instead of 0 in ucf64_raise_sigfpe Eric W. Biederman
2018-04-20  1:04 ` [REVIEW][PATCH 15/17] signal: Add TRAP_UNK si_code for undiagnosted trap exceptions Eric W. Biederman
2018-04-20  1:04 ` [REVIEW][PATCH 16/17] signal/alpha: Replace TRAP_FIXME with TRAP_UNK Eric W. Biederman
2018-04-20  1:04 ` [REVIEW][PATCH 17/17] signal/powerpc: " Eric W. Biederman
2018-04-20 14:35 ` [REVIEW][PATCH 00/22] Simplifying siginfo users Eric W. Biederman
2018-04-20 14:37   ` [REVIEW][PATCH 01/22] signal/alpha: Use send_sig_fault where appropriate Eric W. Biederman
2018-04-20 14:37   ` [REVIEW][PATCH 02/22] signal/alpha: Use force_sig_fault " Eric W. Biederman
2018-04-20 14:37   ` [REVIEW][PATCH 03/22] signal/c6x: " Eric W. Biederman
2018-04-20 14:37   ` [REVIEW][PATCH 04/22] signal/hexagon: Use force_sig_fault as appropriate Eric W. Biederman
2018-04-20 14:37   ` [REVIEW][PATCH 05/22] signal/m68k: Use force_sig_fault where appropriate Eric W. Biederman
2018-04-20 14:37   ` [REVIEW][PATCH 06/22] signal/microblaze: Remove the commented out force_sig_info in do_page_fault Eric W. Biederman
2018-04-20 14:37   ` [REVIEW][PATCH 07/22] signal/microblaze: Use force_sig_fault where appropriate Eric W. Biederman
2018-04-20 14:37   ` [REVIEW][PATCH 08/22] signal/mips: " Eric W. Biederman
2018-05-09 15:14     ` Matt Redfearn
2018-05-10  2:39       ` Eric W. Biederman
2018-05-10  7:59         ` Matt Redfearn
2018-05-11  2:31           ` Eric W. Biederman
2018-04-20 14:37   ` [REVIEW][PATCH 09/22] signal/nds32: " Eric W. Biederman
2018-04-25 11:29     ` Vincent Chen
2018-04-25 15:57       ` Eric W. Biederman
2018-04-26  1:24         ` Greentime Hu
2018-04-20 14:37   ` [REVIEW][PATCH 10/22] signal/nios2: " Eric W. Biederman
2018-04-20 14:38   ` [REVIEW][PATCH 11/22] signal/openrisc: " Eric W. Biederman
2018-04-20 14:38   ` [REVIEW][PATCH 12/22] signal/parisc: Use force_sig_mceerr " Eric W. Biederman
2018-04-20 14:38   ` [REVIEW][PATCH 13/22] signal/parisc: Use force_sig_fault " Eric W. Biederman
2018-04-21 17:24     ` Helge Deller
2018-04-20 14:38   ` [REVIEW][PATCH 14/22] signal/riscv: " Eric W. Biederman
2018-04-21  7:25     ` Christoph Hellwig
2018-04-24 15:31       ` [REVIEW][PATCH 23/22] signal/riscv: Replace do_trap_siginfo with force_sig_fault Eric W. Biederman
2018-04-23 19:11     ` [REVIEW][PATCH 14/22] signal/riscv: Use force_sig_fault where appropriate Palmer Dabbelt
2018-04-24 15:28       ` Eric W. Biederman
2018-04-20 14:38   ` [REVIEW][PATCH 15/22] signal/s390: " Eric W. Biederman
2018-04-23  5:44     ` Martin Schwidefsky
2018-04-20 14:38   ` [REVIEW][PATCH 16/22] signal/sh: " Eric W. Biederman
2018-04-20 14:55     ` Rich Felker
2018-05-28  9:19       ` Geert Uytterhoeven
2018-05-29 15:00         ` [PATCH] signal/sh: Stop gcc warning about an impossible case in do_divide_error Eric W. Biederman
2018-05-30  7:54           ` Sergei Shtylyov
2018-04-20 14:38   ` [REVIEW][PATCH 17/22] signal/sparc: Use send_sig_fault where appropriate Eric W. Biederman
2018-04-20 14:38   ` [REVIEW][PATCH 18/22] signal/sparc: Use force_sig_fault " Eric W. Biederman
2018-04-20 14:38   ` [REVIEW][PATCH 19/22] signal/um: Use force_sig_fault in relay_signal Eric W. Biederman
2018-04-20 16:06     ` [uml-devel] " Anton Ivanov
2018-04-24  8:32       ` Richard Weinberger
2018-04-24  8:44         ` Anton Ivanov
2018-04-24 15:59           ` Eric W. Biederman
     [not found]             ` <CAMD8JhwgcWCp6c=O4-spNW1VdY5M-eAjr7M5PieeAfeTSe_4yw@mail.gmail.com>
2018-04-24 22:03               ` Martin Pärtel
2018-04-24 22:24                 ` Eric W. Biederman
2018-04-25 23:05                   ` Martin Pärtel
2018-04-28 14:02                     ` [REVIEW][PATCH 0/5] Improving siginfo_layout and fixing uml's relay_signal Eric W. Biederman
2018-04-28 14:06                       ` [REVIEW][PATCH 1/5] signal/signalfd: Remove __put_user from signalfd_copyinfo Eric W. Biederman
2018-04-28 14:06                       ` [REVIEW][PATCH 2/5] signal/signalfd: Add support for SIGSYS Eric W. Biederman
2018-04-28 14:07                       ` [REVIEW][PATCH 3/5] signal: Remove unncessary #ifdef SEGV_PKUERR in 32bit compat code Eric W. Biederman
2018-04-28 14:07                       ` [REVIEW][PATCH 4/5] signal: Extend siginfo_layout with SIL_FAULT_{MCEERR|BNDERR|PKUERR} Eric W. Biederman
2018-04-28 14:07                       ` [REVIEW][PATCH 5/5] signal/um: More carefully relay signals in relay_signal Eric W. Biederman
2018-04-20 14:38   ` [REVIEW][PATCH 20/22] signal/um: Use force_sig_fault where appropriate Eric W. Biederman
2018-04-20 14:38   ` [REVIEW][PATCH 21/22] signal/xtensa: Consistenly use SIGBUS in do_unaligned_user Eric W. Biederman
2018-04-20 16:06     ` Max Filippov
2018-04-20 14:38   ` [REVIEW][PATCH 22/22] signal/xtensa: Use force_sig_fault where appropriate Eric W. Biederman
2018-04-20 16:27     ` Max Filippov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).