Skip to content

siginfo unification

Eric W. Biederman linux-arch linux-arm-kernel linux-metag linux-parisc linux-sh linuxppc-dev lkml openrisc stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest22 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/22signal: Document all of the signals that use the _sigfault union memberinclude/uapi/asm-generic/siginfo.h+1 -10 replies
2/22signal: Document the strange si_codes used by ptrace event stopsinclude/uapi/asm-generic/siginfo.h+5 -00 replies
3/22signal: Document glibc's si_code of SI_ASYNCNLinclude/uapi/asm-generic/siginfo.h+1 -00 replies
4/22signal: Ensure no siginfo union member increases the size of struct siginfokernel/signal.c+1 -00 replies
5/22signal: Clear si_sys_private before copying siginfo to userspacekernel/signal.c+3 -00 replies
6/22signal: Remove _sys_private and _overrun_incr from struct compat_siginfoarch/arm64/include/asm/compat.h arch/parisc/include/asm/compat.h arch/powerpc/include/asm/compat.h +5 more+1 -100 replies
7/22ia64/signal: switch to generic struct siginfoarch/ia64/include/uapi/asm/siginfo.h include/uapi/asm-generic/siginfo.h+5 -670 replies
8/22signal/ia64: switch the last arch-specific copy_siginfo_to_user() to generic versionarch/ia64/include/uapi/asm/siginfo.h arch/ia64/kernel/signal.c kernel/signal.c+5 -580 replies
9/22signal/mips: switch mips to generic siginfoarch/mips/include/uapi/asm/siginfo.h include/uapi/asm-generic/siginfo.h+6 -850 replies
10/22signal: Remove unnecessary ifdefs now that there is only one struct siginfoinclude/linux/signal.h include/uapi/asm-generic/siginfo.h kernel/signal.c+0 -140 replies
11/22signal: kill __ARCH_SI_UID_Tinclude/uapi/asm-generic/siginfo.h+3 -80 replies
12/22signal: unify compat_siginfo_tarch/arm64/include/asm/compat.h arch/mips/include/asm/compat.h arch/parisc/include/asm/compat.h +7 more+94 -5250 replies
13/22signal: Move addr_lsb into the _sigfault union for clarityinclude/linux/compat.h include/uapi/asm-generic/siginfo.h+21 -55 replies
14/22signal/powerpc: Remove redefinition of NSIGTRAP on powerpcarch/powerpc/include/uapi/asm/siginfo.h+0 -30 replies
15/22signal/ia64: Move the ia64 specific si_codes to asm-generic/siginfo.harch/ia64/include/uapi/asm/siginfo.h arch/x86/kernel/signal_compat.c include/uapi/asm-generic/siginfo.h+21 -320 replies
16/22signal/frv: Move the frv specific si_codes to asm-generic/siginfo.harch/frv/include/uapi/asm/Kbuild arch/frv/include/uapi/asm/siginfo.h include/uapi/asm-generic/siginfo.h+4 -130 replies
17/22signal/tile: Move the tile specific si_codes to asm-generic/siginfo.harch/tile/include/uapi/asm/siginfo.h include/uapi/asm-generic/siginfo.h+4 -80 replies
18/22signal/blackfin: Move the blackfin specific si_codes to asm-generic/siginfo.harch/blackfin/include/uapi/asm/siginfo.h include/uapi/asm-generic/siginfo.h kernel/signal.c+33 -370 replies
19/22signal/blackfin: Remove pointless UID16_SIGINFO_COMPAT_NEEDEDarch/blackfin/include/uapi/asm/siginfo.h+0 -20 replies
20/22signal: Unify and correct copy_siginfo_from_user32arch/arm64/kernel/signal32.c arch/mips/kernel/signal32.c arch/parisc/kernel/signal32.c +8 more+82 -1780 replies
21/22signal: Remove the code to clear siginfo before calling copy_siginfo_from_user32kernel/ptrace.c kernel/signal.c+2 -30 replies
22/22signal: Unify and correct copy_siginfo_to_user32arch/arm64/kernel/signal32.c arch/mips/include/asm/compat.h arch/mips/kernel/signal32.c +13 more+96 -5162 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/22] siginfo unification

The following changes are available at:
git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git siginfo-testing

This set of changes unifies struct siginfo and struct compat_siginfo so that there is only one definition of each. Additionally this ends up with a single implementation of copy_siginfo_to_user32 and copy_siginfo_from_user32.

This results in much less code, that might be slightly less readable as it handles all of the cases it needs to deal with instead of just a few. Not a single implementation of copy_siginfo_to_user32 or copy_siginfo_from_user32 handled all of the ways data is encoded in struct siginfo today.

Hopefully this will result in much more maintainable code.

Al Viro (3):
signal/mips: switch mips to generic siginfo
signal: kill __ARCH_SI_UID_T
signal: unify compat_siginfo_t

Eric W. Biederman (19):
signal: Document all of the signals that use the _sigfault union member
signal: Document the strange si_codes used by ptrace event stops
signal: Document glibc's si_code of SI_ASYNCNL
signal: Ensure no siginfo union member increases the size of struct siginfo
signal: Clear si_sys_private before copying siginfo to userspace
signal: Remove _sys_private and _overrun_incr from struct compat_siginfo ia64/signal: switch to generic struct siginfo
signal/ia64: switch the last arch-specific copy_siginfo_to_user() to generic version
signal: Remove unnecessary ifdefs now that there is only one struct siginfo
signal: Move addr_lsb into the _sigfault union for clarity signal/powerpc: Remove redefinition of NSIGTRAP on powerpc signal/ia64: Move the ia64 specific si_codes to asm-generic/siginfo.h signal/frv: Move the frv specific si_codes to asm-generic/siginfo.h signal/tile: Move the tile specific si_codes to asm-generic/siginfo.h signal/blackfin: Move the blackfin specific si_codes to asm-generic/siginfo.h signal/blackfin: Remove pointless UID16_SIGINFO_COMPAT_NEEDED
signal: Unify and correct copy_siginfo_from_user32
signal: Remove the code to clear siginfo before calling copy_siginfo_from_user32
signal: Unify and correct copy_siginfo_to_user32

 arch/arm64/include/asm/compat.h          |  64 ----------
 arch/arm64/kernel/signal32.c             |  80 -------------
 arch/blackfin/include/uapi/asm/siginfo.h |  34 ------
 arch/frv/include/uapi/asm/Kbuild         |   1 +
 arch/frv/include/uapi/asm/siginfo.h      |  13 --
 arch/ia64/include/uapi/asm/siginfo.h     |  96 ---------------
 arch/ia64/kernel/signal.c                |  52 --------
 arch/mips/include/asm/compat.h           |  73 ------------
 arch/mips/include/uapi/asm/siginfo.h     |  86 +-------------
 arch/mips/kernel/signal32.c              |  67 -----------
 arch/parisc/include/asm/compat.h         |  64 ----------
 arch/parisc/kernel/signal32.c            | 106 -----------------
 arch/parisc/kernel/signal32.h            |   3 -
 arch/powerpc/include/asm/compat.h        |  65 ----------
 arch/powerpc/include/uapi/asm/siginfo.h  |   3 -
 arch/powerpc/kernel/signal_32.c          |  66 -----------
 arch/s390/include/asm/compat.h           |  73 ------------
 arch/s390/kernel/compat_signal.c         | 100 ----------------
 arch/sparc/include/asm/compat.h          |  59 ---------
 arch/sparc/kernel/signal32.c             |  69 -----------
 arch/tile/include/asm/compat.h           |  62 ----------
 arch/tile/include/uapi/asm/siginfo.h     |   8 --
 arch/tile/kernel/compat_signal.c         |  73 ------------
 arch/x86/include/asm/compat.h            |  86 +-------------
 arch/x86/include/asm/fpu/signal.h        |   6 -
 arch/x86/kernel/signal_compat.c          | 123 ++-----------------
 include/linux/compat.h                   | 100 +++++++++++++++-
 include/linux/signal.h                   |   2 -
 include/uapi/asm-generic/siginfo.h       | 109 +++++++++++++----
 kernel/ptrace.c                          |   1 -
 kernel/signal.c                          | 197 +++++++++++++++++++++++++++++--
 31 files changed, 382 insertions(+), 1559 deletions(-)

Eric