siginfo fixes/cleanups esp SI_USER
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest11 patches 30 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/11 | signal: Simplify and fix kdb_send_sigkernel/ kernel/ kernel/ | +10 | 0 replies | |
| 2/11 | signal/sh: Ensure si_signo is initialized in do_divide_errorarch/ | +2 | 0 replies | |
| 3/11 | signal/openrisc: Fix do_unaligned_access to send the proper signalarch/ | +5 | 2 replies | |
| 4/11 | signal/parisc: Document a conflict with SI_USER with SIGFPEarch/ arch/ | +8 | 6 replies | |
| 5/11 | signal/metag: Document a conflict with SI_USER with SIGFPEarch/ arch/ | +8 | 0 replies | |
| 6/11 | signal/powerpc: Document conflicts with SI_USER and SIGFPE and SIGTRAParch/ arch/ | +20 | 0 replies | |
| 7/11 | signal/arm64: Document conflicts with SI_USER and SIGFPE,SIGTRAP,SIGBUSarch/ arch/ arch/ +1 more | +83 | 18 replies | |
| 8/11 | signal/arm: Document conflicts with SI_USER and SIGFPEarch/ arch/ | +14 | 4 replies | |
| 9/11 | signal: Reduce copy_siginfo to just a memcpyinclude/ | +2 | 0 replies | |
| 10/11 | signal: Introduce clear_siginfoinclude/ | +5 | 0 replies | |
| 11/11 | signal: Ensure generic siginfos the kernel sends have all bits initializedfs/ ipc/ kernel/ | +10 | 0 replies |
Reviews trailers per patch
1 of 11 patches has a Reviewed-by or Acked-by.
| Patch | Stafford Horne |
|---|---|
| 1/11 | |
| 2/11 | |
| 3/11 | A-b |
| 4/11 | |
| 5/11 | |
| 6/11 | |
| 7/11 | |
| 8/11 | |
| 9/11 | |
| 10/11 | |
| 11/11 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 00/11] siginfo fixes/cleanups esp SI_USER
The following changes are available at:
git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git siginfo-minor-fixesv2
While answering a question about my earlier introduction to siginfo_layout I realized that the code introduces a small number of cases where unitialized memory is copied to userspace as a result of the fact that SI_USER is sometimes confused with another si_code.
This modifies all of the places in the kernel that generate a signal with si_code == SI_USER to fully initialize all of siginfo. Further this change updates architectures that are using si_code of 0 to mean something other than SI_USER to use TRAP_FIXME, FPE_FIXME, or BUS_FIXME to document the problem.
With all these changes take together there is no danger of copying unitialized values to userspace when SI_USER is mistaken for TRAP_FIXME, FPE_FIXME or BUS_FIXME.
This series also contains a fix for sh and a fix for openrisc where they are improperly generating a signal and the fix is obvious.
Eric W. Biederman (11):
signal: Simplify and fix kdb_send_sig
signal/sh: Ensure si_signo is initialized in do_divide_error signal/openrisc: Fix do_unaligned_access to send the proper signal signal/parisc: Document a conflict with SI_USER with SIGFPE signal/metag: Document a conflict with SI_USER with SIGFPE signal/powerpc: Document conflicts with SI_USER and SIGFPE and SIGTRAP signal/arm64: Document conflicts with SI_USER and SIGFPE,SIGTRAP,SIGBUS signal/arm: Document conflicts with SI_USER and SIGFPE
signal: Reduce copy_siginfo to just a memcpy
signal: Introduce clear_siginfo
signal: Ensure generic siginfos the kernel sends have all bits initialized
arch/arm/include/uapi/asm/siginfo.h | 13 ++++ arch/arm/vfp/vfpmodule.c | 2 +- arch/arm64/include/uapi/asm/siginfo.h | 21 ++++++ arch/arm64/kernel/fpsimd.c | 2 +- arch/arm64/mm/fault.c | 114 ++++++++++++++++---------------- arch/metag/include/uapi/asm/siginfo.h | 7 ++ arch/metag/kernel/traps.c | 2 +- arch/openrisc/kernel/traps.c | 10 +-- arch/parisc/include/uapi/asm/siginfo.h | 7 ++ arch/parisc/kernel/traps.c | 2 +- arch/powerpc/include/uapi/asm/siginfo.h | 15 +++++ arch/powerpc/kernel/traps.c | 10 +-- arch/sh/kernel/traps_32.c | 3 +- fs/fcntl.c | 1 + include/linux/signal.h | 13 ++-- ipc/mqueue.c | 1 + kernel/debug/kdb/kdb_main.c | 10 +-- kernel/debug/kdb/kdb_private.h | 2 +- kernel/signal.c | 27 +++++--- 19 files changed, 167 insertions(+), 95 deletions(-)