untangle the <asm/siginfo.h> mess
Subsystems (11)
We currently have uapi versions of <asm/siginfo.h> which at least on a few architectures define bits of the userspace ABI before including an uapi asm-generic version, and also non-uapi versions which do almost nothing except for making sure other headers include the right uapi one before including an asm-generic that defined two prototypes and a few defines that aren't architecture specific in any.
This series completely gets rid of the non-uapi versions and cleans up various small bits on the way.
Note that Thomas has some posix-timers work overlapping with this, so it might make sense to take these through the tip tree.
PATCH 1/5 sparc: simplify <asm/siginfo.h>
There is no need for the forward declaration of compat_siginfo provided here. We can't yet use the generic header as we need to pull in the sparc-specific version of the uapi <asm/siginfo.h>, but this prepares for removing the non-uapi <asm/siginfo.h> entirely.
--- arch/sparc/include/asm/siginfo.h | 12 ------------ 1 file changed, 12 deletions(-)
arch/sparc/include/asm/siginfo.h +0 -12
@@ -1,13 +1 @@ -#ifndef __SPARC_SIGINFO_H -#define __SPARC_SIGINFO_H -#include <uapi/asm/siginfo.h> - - -#ifdef CONFIG_COMPAT - -struct compat_siginfo ; - -#endif /* CONFIG_COMPAT */ - -#endif /* !(__SPARC_SIGINFO_H) */
Signature · 1 line
2.11.0
Re: [PATCH 1/5] sparc: simplify <asm/siginfo.h>
From: Christoph Hellwig <[email protected]>
Date: Sat, 3 Jun 2017 21:00:58 +0200
Quoted 6 lines
There is no need for the forward declaration of
compat_siginfoprovided here. We can't yet use the generic header as we need to pull in the sparc-specific version of the uapi <asm/siginfo.h>, but this prepares for removing the non-uapi <asm/siginfo.h> entirely.Signed-off-by Christoph Hellwig <[email protected]>
tip-bot for Christoph Hellwig
merge bot[tip:timers/core] sparc: Simplify <asm/siginfo.h>
In reply to Christoph Hellwigsparc: Simplify <asm/siginfo.h>
Commit-ID: f70c80068f073ace4b9071803d2e2691fe0c3d05 Gitweb: http://git.kernel.org/tip/f70c80068f073ace4b9071803d2e2691fe0c3d05 Author: Christoph Hellwig <[email protected]> AuthorDate: Sat, 3 Jun 2017 21:00:58 +0200 Committer: Thomas Gleixner <[email protected]> CommitDate: Sun, 4 Jun 2017 15:11:45 +0200
sparc: Simplify <asm/siginfo.h>
There is no need for the forward declaration of compat_siginfo provided here. We can't yet use the generic header as we need to pull in the sparc-specific version of the uapi <asm/siginfo.h>, but this prepares for removing the non-uapi <asm/siginfo.h> entirely.
--- arch/sparc/include/asm/siginfo.h | 12 ------------ 1 file changed, 12 deletions(-)
arch/sparc/include/asm/siginfo.h +0 -12
@@ -1,13 +1 @@ -#ifndef __SPARC_SIGINFO_H -#define __SPARC_SIGINFO_H -#include <uapi/asm/siginfo.h> - - -#ifdef CONFIG_COMPAT - -struct compat_siginfo ; - -#endif /* CONFIG_COMPAT */ - -#endif /* !(__SPARC_SIGINFO_H) */
PATCH 2/5 ia64: remove HAVE_ARCH_COPY_SIGINFO
In reply to Christoph HellwigSince ia64 defines __ARCH_SI_PREAMBLE_SIZE it can just use the generic copy_siginfo implementation, which is identical to the architecture specific one.
With that support for HAVE_ARCH_COPY_SIGINFO can go away entirely.
--- arch/ia64/include/asm/siginfo.h | 22 ---------------------- arch/ia64/include/uapi/asm/siginfo.h | 1 - include/linux/signal.h | 7 +------ 3 files changed, 1 insertion(+), 29 deletions(-)
arch/ia64/include/asm/siginfo.h +0 -22
@@ -1,23 +1 @@ -/* -* Based on <asm-i386/siginfo.h>. -* -* Modified 1998-2002 -* David Mosberger-Tang <[email protected]>, Hewlett-Packard Co -*/ -#ifndef _ASM_IA64_SIGINFO_H -#define _ASM_IA64_SIGINFO_H - -#include <linux/string.h> #include <uapi/asm/siginfo.h> - -static inline void -copy_siginfo (siginfo_t *to,siginfo_t *from) -{ -if (from->si_code <0 ) -memcpy (to, from,sizeof (siginfo_t)); -else -/* _sigchld is currently the largest know union member */ -memcpy (to, from,4 *sizeof (int ) +sizeof (from->_sifields._sigchld)); -} - -#endif /* _ASM_IA64_SIGINFO_H */
arch/ia64/include/uapi/asm/siginfo.h +0 -1
@@ -11,7 +11,6 @@#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))#define HAVE_ARCH_SIGINFO_T -#define HAVE_ARCH_COPY_SIGINFO #define HAVE_ARCH_COPY_SIGINFO_TO_USER #include <asm-generic/siginfo.h>
include/linux/signal.h +1 -6
@@ -3,16 +3,13 @@#include <linux/bug.h> #include <linux/signal_types.h> +#include <linux/string.h> struct task_struct ;/* for sysctl */ extern int print_fatal_signals; -#ifndef HAVE_ARCH_COPY_SIGINFO - -#include <linux/string.h> -static inline void copy_siginfo (struct siginfo *to,struct siginfo *from) {if (from->si_code <0 )
@@ -22,8 +19,6 @@ static inline void copy_siginfo(struct siginfo *to, struct siginfo *from)memcpy (to, from, __ARCH_SI_PREAMBLE_SIZE +sizeof (from->_sifields._sigchld)); } -#endif -/* * Define some primitives to manipulate sigset_t. */
Signature · 1 line
2.11.0
tip-bot for Christoph Hellwig
merge bot[tip:timers/core] ia64: Remove HAVE_ARCH_COPY_SIGINFO
ia64: Remove HAVE_ARCH_COPY_SIGINFO
Commit-ID: 7994200ce69a3873dfa2641254a13bb0a40056f3 Gitweb: http://git.kernel.org/tip/7994200ce69a3873dfa2641254a13bb0a40056f3 Author: Christoph Hellwig <[email protected]> AuthorDate: Sat, 3 Jun 2017 21:00:59 +0200 Committer: Thomas Gleixner <[email protected]> CommitDate: Sun, 4 Jun 2017 15:11:46 +0200
ia64: Remove HAVE_ARCH_COPY_SIGINFO
Since ia64 defines __ARCH_SI_PREAMBLE_SIZE it can just use the generic copy_siginfo implementation, which is identical to the architecture specific one.
With that support for HAVE_ARCH_COPY_SIGINFO can go away entirely.
--- arch/ia64/include/asm/siginfo.h | 22 ---------------------- arch/ia64/include/uapi/asm/siginfo.h | 1 - include/linux/signal.h | 7 +------ 3 files changed, 1 insertion(+), 29 deletions(-)
arch/ia64/include/asm/siginfo.h +0 -22
@@ -1,23 +1 @@ -/* -* Based on <asm-i386/siginfo.h>. -* -* Modified 1998-2002 -* David Mosberger-Tang <[email protected]>, Hewlett-Packard Co -*/ -#ifndef _ASM_IA64_SIGINFO_H -#define _ASM_IA64_SIGINFO_H - -#include <linux/string.h> #include <uapi/asm/siginfo.h> - -static inline void -copy_siginfo (siginfo_t *to,siginfo_t *from) -{ -if (from->si_code <0 ) -memcpy (to, from,sizeof (siginfo_t)); -else -/* _sigchld is currently the largest know union member */ -memcpy (to, from,4 *sizeof (int ) +sizeof (from->_sifields._sigchld)); -} - -#endif /* _ASM_IA64_SIGINFO_H */
arch/ia64/include/uapi/asm/siginfo.h +0 -1
@@ -11,7 +11,6 @@#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))#define HAVE_ARCH_SIGINFO_T -#define HAVE_ARCH_COPY_SIGINFO #define HAVE_ARCH_COPY_SIGINFO_TO_USER #include <asm-generic/siginfo.h>
include/linux/signal.h +1 -6
@@ -3,16 +3,13 @@#include <linux/bug.h> #include <linux/signal_types.h> +#include <linux/string.h> struct task_struct ;/* for sysctl */ extern int print_fatal_signals; -#ifndef HAVE_ARCH_COPY_SIGINFO - -#include <linux/string.h> -static inline void copy_siginfo (struct siginfo *to,struct siginfo *from) {if (from->si_code <0 )
@@ -22,8 +19,6 @@ static inline void copy_siginfo(struct siginfo *to, struct siginfo *from)memcpy (to, from, __ARCH_SI_PREAMBLE_SIZE +sizeof (from->_sifields._sigchld)); } -#endif -/* * Define some primitives to manipulate sigset_t. */
PATCH 3/5 posix-timers: move the do_schedule_next_timer declaration
In reply to Christoph HellwigHaving it in asm-generic/siginfo.h doesn't make any sense as it is in no way architecture specific. Move it to posix-timers.h instead.
--- include/asm-generic/siginfo.h | 1 - include/linux/posix-timers.h | 3 +++ kernel/signal.c | 1 + 3 files changed, 4 insertions(+), 1 deletion(-)
include/asm-generic/siginfo.h +0 -1
@@ -15,7 +15,6 @@#define __SI_CODE (T ,N ) ((T) | ((N) & 0xffff))struct siginfo ; -void do_schedule_next_timer (struct siginfo *info);extern int copy_siginfo_to_user (struct siginfo __user *to,const struct siginfo *from);
include/linux/posix-timers.h +3 -0
@@ -7,6 +7,7 @@#include <linux/timex.h> #include <linux/alarmtimer.h> +struct siginfo ;struct cpu_timer_list {struct list_head entry;
@@ -125,4 +126,6 @@ long clock_nanosleep_restart(struct restart_block *restart_block);void update_rlimit_cpu (struct task_struct *task,unsigned long rlim_new); +void do_schedule_next_timer (struct siginfo *info); +#endif
kernel/signal.c +1 -0
@@ -39,6 +39,7 @@#include <linux/compat.h> #include <linux/cn_proc.h> #include <linux/compiler.h> +#include <linux/posix-timers.h> #define CREATE_TRACE_POINTS #include <trace/events/signal.h>
Signature · 1 line
2.11.0
tip-bot for Christoph Hellwig
merge bot[tip:timers/core] posix-timers: Move the do_schedule_next_timer declaration
posix-timers: Move the do_schedule_next_timer declaration
Commit-ID: 31ea70e0308b73a1b862bd17c06efc3cbcfd2016 Gitweb: http://git.kernel.org/tip/31ea70e0308b73a1b862bd17c06efc3cbcfd2016 Author: Christoph Hellwig <[email protected]> AuthorDate: Sat, 3 Jun 2017 21:01:00 +0200 Committer: Thomas Gleixner <[email protected]> CommitDate: Sun, 4 Jun 2017 15:11:46 +0200
posix-timers: Move the do_schedule_next_timer declaration
Having it in asm-generic/siginfo.h doesn't make any sense as it is in no way architecture specific. Move it to posix-timers.h instead.
--- include/asm-generic/siginfo.h | 1 - include/linux/posix-timers.h | 3 +++ kernel/signal.c | 1 + 3 files changed, 4 insertions(+), 1 deletion(-)
include/asm-generic/siginfo.h +0 -1
@@ -15,7 +15,6 @@#define __SI_CODE (T ,N ) ((T) | ((N) & 0xffff))struct siginfo ; -void do_schedule_next_timer (struct siginfo *info);extern int copy_siginfo_to_user (struct siginfo __user *to,const struct siginfo *from);
include/linux/posix-timers.h +3 -0
@@ -7,6 +7,7 @@#include <linux/timex.h> #include <linux/alarmtimer.h> +struct siginfo ;struct cpu_timer_list {struct list_head entry;
@@ -120,4 +121,6 @@ long clock_nanosleep_restart(struct restart_block *restart_block);void update_rlimit_cpu (struct task_struct *task,unsigned long rlim_new); +void do_schedule_next_timer (struct siginfo *info); +#endif
kernel/signal.c +1 -0
@@ -39,6 +39,7 @@#include <linux/compat.h> #include <linux/cn_proc.h> #include <linux/compiler.h> +#include <linux/posix-timers.h> #define CREATE_TRACE_POINTS #include <trace/events/signal.h>
PATCH 4/5 signal: move copy_siginfo_to_user to <linux/signal.h>
In reply to Christoph HellwigHaving it in asm-generic/siginfo.h doesn't make any sense as it is in no way architecture specific. Move it to signal.h instead where several related functions already reside.
--- include/asm-generic/siginfo.h | 4 ---- include/linux/signal.h | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-)
include/asm-generic/siginfo.h +0 -4
@@ -14,8 +14,4 @@#define __SI_SYS (7 << 16)#define __SI_CODE (T ,N ) ((T) | ((N) & 0xffff)) -struct siginfo ; - -extern int copy_siginfo_to_user (struct siginfo __user *to,const struct siginfo *from); -#endif
include/linux/signal.h +2 -0
@@ -19,6 +19,8 @@ static inline void copy_siginfo(struct siginfo *to, struct siginfo *from)memcpy (to, from, __ARCH_SI_PREAMBLE_SIZE +sizeof (from->_sifields._sigchld)); } +int copy_siginfo_to_user (struct siginfo __user *to,const struct siginfo *from); +/* * Define some primitives to manipulate sigset_t. */
Signature · 1 line
2.11.0
tip-bot for Christoph Hellwig
merge bot[tip:timers/core] signal: Move copy_siginfo_to_user to <linux/signal.h>
signal: Move copy_siginfo_to_user to <linux/signal.h>
Commit-ID: b9253a43370e8f3c46c0ee24b04fa2ffec37b7c0 Gitweb: http://git.kernel.org/tip/b9253a43370e8f3c46c0ee24b04fa2ffec37b7c0 Author: Christoph Hellwig <[email protected]> AuthorDate: Sat, 3 Jun 2017 21:01:01 +0200 Committer: Thomas Gleixner <[email protected]> CommitDate: Sun, 4 Jun 2017 15:11:46 +0200
signal: Move copy_siginfo_to_user to <linux/signal.h>
Having it in asm-generic/siginfo.h doesn't make any sense as it is in no way architecture specific. Move it to signal.h instead where several related functions already reside.
--- include/asm-generic/siginfo.h | 4 ---- include/linux/signal.h | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-)
include/asm-generic/siginfo.h +0 -4
@@ -14,8 +14,4 @@#define __SI_SYS (7 << 16)#define __SI_CODE (T ,N ) ((T) | ((N) & 0xffff)) -struct siginfo ; - -extern int copy_siginfo_to_user (struct siginfo __user *to,const struct siginfo *from); -#endif
include/linux/signal.h +2 -0
@@ -19,6 +19,8 @@ static inline void copy_siginfo(struct siginfo *to, struct siginfo *from)memcpy (to, from, __ARCH_SI_PREAMBLE_SIZE +sizeof (from->_sifields._sigchld)); } +int copy_siginfo_to_user (struct siginfo __user *to,const struct siginfo *from); +/* * Define some primitives to manipulate sigset_t. */
PATCH 5/5 remove non-uapi <asm/siginfo.h>
In reply to Christoph HellwigBy moving the kernel side __SI_* defintions right next to the userspace ones we can kill the non-uapi versions of <asm/siginfo.h> include include/asm-generic/siginfo.h and untangle the unholy mess of includes.
--- arch/arc/include/asm/Kbuild | 1 - arch/arm/include/asm/Kbuild | 1 - arch/arm/include/uapi/asm/Kbuild | 2 ++ arch/c6x/include/asm/Kbuild | 1 - arch/c6x/include/uapi/asm/Kbuild | 1 + arch/cris/include/asm/Kbuild | 1 - arch/cris/include/uapi/asm/Kbuild | 2 ++ arch/h8300/include/asm/Kbuild | 1 - arch/h8300/include/uapi/asm/Kbuild | 2 ++ arch/hexagon/include/asm/Kbuild | 1 - arch/ia64/include/asm/siginfo.h | 1 - arch/m68k/include/asm/Kbuild | 1 - arch/m68k/include/uapi/asm/Kbuild | 1 + arch/nios2/include/asm/Kbuild | 1 - arch/nios2/include/uapi/asm/Kbuild | 1 + arch/openrisc/include/asm/Kbuild | 1 - arch/openrisc/include/uapi/asm/Kbuild | 2 ++ arch/sh/include/asm/Kbuild | 1 - arch/sh/include/uapi/asm/Kbuild | 1 + arch/sparc/include/asm/siginfo.h | 1 - arch/unicore32/include/asm/Kbuild | 1 - arch/xtensa/include/asm/Kbuild | 1 - arch/xtensa/include/uapi/asm/Kbuild | 1 + include/asm-generic/siginfo.h | 17 ----------------- include/uapi/asm-generic/siginfo.h | 15 +++++++++++++-- 25 files changed, 26 insertions(+), 33 deletions(-) delete mode 100644 arch/ia64/include/asm/siginfo.h delete mode 100644 arch/sparc/include/asm/siginfo.h delete mode 100644 include/asm-generic/siginfo.h
arch/arc/include/asm/Kbuild +0 -1
@@ -36,7 +36,6 @@ generic-y += preempt.h generic-y += resource.h generic-y += sembuf.h generic-y += shmbuf.h -generic-y += siginfo.h generic-y += socket.h generic-y += sockios.h generic-y += stat.h
arch/arm/include/asm/Kbuild +0 -1
@@ -28,7 +28,6 @@ generic-y += segment.h generic-y += sembuf.h generic-y += serial.h generic-y += shmbuf.h -generic-y += siginfo.h generic-y += simd.h generic-y += sizes.h generic-y += socket.h
arch/arm/include/uapi/asm/Kbuild +2 -0
@@ -4,3 +4,5 @@ include include/uapi/asm-generic/Kbuild.asm genhdr-y += unistd-common.h genhdr-y += unistd-oabi.h genhdr-y += unistd-eabi.h + +generic-y += siginfo.h
arch/c6x/include/asm/Kbuild +0 -1
@@ -45,7 +45,6 @@ generic-y += sembuf.h generic-y += serial.h generic-y += shmbuf.h generic-y += shmparam.h -generic-y += siginfo.h generic-y += signal.h generic-y += socket.h generic-y += sockios.h
arch/c6x/include/uapi/asm/Kbuild +1 -0
@@ -2,3 +2,4 @@ include include/uapi/asm-generic/Kbuild.asm generic-y += kvm_para.h +generic-y += siginfo.h
arch/cris/include/asm/Kbuild +0 -1
@@ -36,7 +36,6 @@ generic-y += resource.h generic-y += sections.h generic-y += sembuf.h generic-y += shmbuf.h -generic-y += siginfo.h generic-y += socket.h generic-y += sockios.h generic-y += statfs.h
arch/cris/include/uapi/asm/Kbuild +2 -0
@@ -1,2 +1,4 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm + +generic-y += siginfo.h
arch/h8300/include/asm/Kbuild +0 -1
@@ -54,7 +54,6 @@ generic-y += serial.h generic-y += setup.h generic-y += shmbuf.h generic-y += shmparam.h -generic-y += siginfo.h generic-y += sizes.h generic-y += socket.h generic-y += sockios.h
arch/h8300/include/uapi/asm/Kbuild +2 -0
@@ -1,2 +1,4 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm + +generic-y += siginfo.h
arch/hexagon/include/asm/Kbuild +0 -1
@@ -41,7 +41,6 @@ generic-y += sembuf.h generic-y += serial.h generic-y += shmbuf.h generic-y += shmparam.h -generic-y += siginfo.h generic-y += sizes.h generic-y += socket.h generic-y += sockios.h
arch/ia64/include/asm/siginfo.h deleted +0 -1
@@ -1 +0,0 @@ -#include <uapi/asm/siginfo.h>
arch/m68k/include/asm/Kbuild +0 -1
@@ -25,7 +25,6 @@ generic-y += preempt.h generic-y += resource.h generic-y += sections.h generic-y += shmparam.h -generic-y += siginfo.h generic-y += spinlock.h generic-y += statfs.h generic-y += termios.h
arch/m68k/include/uapi/asm/Kbuild +1 -0
@@ -5,6 +5,7 @@ generic-y += auxvec.h generic-y += msgbuf.h generic-y += sembuf.h generic-y += shmbuf.h +generic-y += siginfo.h generic-y += socket.h generic-y += sockios.h generic-y += termbits.h
arch/nios2/include/asm/Kbuild +0 -1
@@ -47,7 +47,6 @@ generic-y += segment.h generic-y += sembuf.h generic-y += serial.h generic-y += shmbuf.h -generic-y += siginfo.h generic-y += signal.h generic-y += socket.h generic-y += sockios.h
arch/nios2/include/uapi/asm/Kbuild +1 -0
@@ -2,4 +2,5 @@ include include/uapi/asm-generic/Kbuild.asm generic-y += setup.h +generic-y += siginfo.h generic-y += ucontext.h
arch/openrisc/include/asm/Kbuild +0 -1
@@ -46,7 +46,6 @@ generic-y += sembuf.h generic-y += setup.h generic-y += shmbuf.h generic-y += shmparam.h -generic-y += siginfo.h generic-y += signal.h generic-y += socket.h generic-y += sockios.h
arch/openrisc/include/uapi/asm/Kbuild +2 -0
@@ -1,2 +1,4 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm + +generic-y += siginfo.h
arch/sh/include/asm/Kbuild +0 -1
@@ -29,7 +29,6 @@ generic-y += rwsem.h generic-y += sembuf.h generic-y += serial.h generic-y += shmbuf.h -generic-y += siginfo.h generic-y += sizes.h generic-y += socket.h generic-y += statfs.h
arch/sh/include/uapi/asm/Kbuild +1 -0
@@ -1,2 +1,3 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm +generic-y += siginfo.h
arch/sparc/include/asm/siginfo.h deleted +0 -1
@@ -1 +0,0 @@ -#include <uapi/asm/siginfo.h>
arch/unicore32/include/asm/Kbuild +0 -1
@@ -44,7 +44,6 @@ generic-y += serial.h generic-y += setup.h generic-y += shmbuf.h generic-y += shmparam.h -generic-y += siginfo.h generic-y += signal.h generic-y += sizes.h generic-y += socket.h
arch/xtensa/include/asm/Kbuild +0 -1
@@ -25,7 +25,6 @@ generic-y += preempt.h generic-y += resource.h generic-y += rwsem.h generic-y += sections.h -generic-y += siginfo.h generic-y += statfs.h generic-y += termios.h generic-y += topology.h
arch/xtensa/include/uapi/asm/Kbuild +1 -0
@@ -1,2 +1,3 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm +generic-y += siginfo.h
include/asm-generic/siginfo.h deleted +0 -17
@@ -1,17 +0,0 @@ -#ifndef _ASM_GENERIC_SIGINFO_H -#define _ASM_GENERIC_SIGINFO_H - -#include <uapi/asm-generic/siginfo.h> - -#define __SI_MASK 0xffff0000u -#define __SI_KILL (0 << 16) -#define __SI_TIMER (1 << 16) -#define __SI_POLL (2 << 16) -#define __SI_FAULT (3 << 16) -#define __SI_CHLD (4 << 16) -#define __SI_RT (5 << 16) -#define __SI_MESGQ (6 << 16) -#define __SI_SYS (7 << 16) -#define __SI_CODE (T ,N ) ((T) | ((N) & 0xffff)) - -#endif
include/uapi/asm-generic/siginfo.h +13 -2
@@ -151,7 +151,18 @@ typedef struct siginfo {#define si_arch _sifields._sigsys._arch#endif -#ifndef __KERNEL__ +#ifdef __KERNEL__ +#define __SI_MASK 0xffff0000u +#define __SI_KILL (0 << 16) +#define __SI_TIMER (1 << 16) +#define __SI_POLL (2 << 16) +#define __SI_FAULT (3 << 16) +#define __SI_CHLD (4 << 16) +#define __SI_RT (5 << 16) +#define __SI_MESGQ (6 << 16) +#define __SI_SYS (7 << 16) +#define __SI_CODE (T ,N ) ((T) | ((N) & 0xffff)) +#else /* __KERNEL__ */ #define __SI_KILL 0#define __SI_TIMER 0#define __SI_POLL 0
@@ -161,7 +172,7 @@ typedef struct siginfo {#define __SI_MESGQ 0#define __SI_SYS 0#define __SI_CODE (T ,N ) (N) -#endif +#endif /* __KERNEL__ */ /* * si_code values
Signature · 1 line
2.11.0
Re: [PATCH 5/5] remove non-uapi <asm/siginfo.h>
Quoted 3 lines · Christoph Hellwig
By moving the kernel side __SI_* defintions right next to the userspace ones we can kill the non-uapi versions of <
asm/siginfo.h> includeinclude/asm-generic/siginfo.hand untangle the unholy mess of includes.
That needs a couple of fixups and we can remove
arch/X/include/uapi/asm/siginfo.h from m32r, microblaze, mn10300 and score.
Delta patch below.
Thanks,
tglx
8<--------------------
arch/sh/include/uapi/asm/Kbuild +1 -0
@@ -1,3 +1,4 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm + generic-y += siginfo.h
arch/arc/include/uapi/asm/Kbuild +2 -0
@@ -1,2 +1,4 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm + +generic-y += siginfo.h
arch/hexagon/include/uapi/asm/Kbuild +2 -0
@@ -1,2 +1,4 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm + +generic-y += siginfo.h
arch/m32r/include/uapi/asm/Kbuild +2 -0
@@ -1,2 +1,4 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm + +generic-y += siginfo.h
arch/m32r/include/uapi/asm/siginfo.h deleted +0 -6
@@ -1,6 +0,0 @@ -#ifndef _M32R_SIGINFO_H -#define _M32R_SIGINFO_H - -#include <asm-generic/siginfo.h> - -#endif /* _M32R_SIGINFO_H */
arch/microblaze/include/uapi/asm/Kbuild +1 -0
@@ -2,3 +2,4 @@ include include/uapi/asm-generic/Kbuild.asm generic-y += types.h +generic-y += siginfo.h
arch/microblaze/include/uapi/asm/siginfo.h deleted +0 -1
@@ -1 +0,0 @@ -#include <asm-generic/siginfo.h>
arch/mn10300/include/uapi/asm/Kbuild +2 -0
@@ -1,2 +1,4 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm + +generic-y += siginfo.h
arch/mn10300/include/uapi/asm/siginfo.h deleted +0 -1
@@ -1 +0,0 @@ -#include <asm-generic/siginfo.h>
arch/score/include/uapi/asm/Kbuild +2 -0
@@ -1,2 +1,4 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm + +generic-y += siginfo.h
arch/score/include/uapi/asm/siginfo.h deleted +0 -6
@@ -1,6 +0,0 @@ -#ifndef _ASM_SCORE_SIGINFO_H -#define _ASM_SCORE_SIGINFO_H - -#include <asm-generic/siginfo.h> - -#endif /* _ASM_SCORE_SIGINFO_H */
arch/unicore32/include/uapi/asm/Kbuild +1 -0
@@ -2,3 +2,4 @@ include include/uapi/asm-generic/Kbuild.asm generic-y += kvm_para.h +generic-y += siginfo.h
Re: [PATCH 5/5] remove non-uapi <asm/siginfo.h>
Quoted 11 lines · Thomas Gleixner
Quoted 3 lines · Christoph Hellwig
By moving the kernel side __SI_* defintions right next to the userspace ones we can kill the non-uapi versions of <
asm/siginfo.h> includeinclude/asm-generic/siginfo.hand untangle the unholy mess of includes.That needs a couple of fixups and we can remove
arch/X/include/uapi/asm/siginfo.hfrom m32r, microblaze, mn10300 and score.Delta patch below.
Thanks. I'm going to include this if I have to resend for some reason.
Re: [PATCH 5/5] remove non-uapi <asm/siginfo.h>
Quoted 7 lines · Christoph Hellwig
Quoted 6 lines · Thomas Gleixner
Quoted 3 lines · Christoph Hellwig
By moving the kernel side __SI_* defintions right next to the userspace ones we can kill the non-uapi versions of <
asm/siginfo.h> includeinclude/asm-generic/siginfo.hand untangle the unholy mess of includes.
Quoted 7 lines
Quoted 5 lines
That needs a couple of fixups and we can remove
arch/X/include/uapi/asm/siginfo.hfrom m32r, microblaze, mn10300 and score.Delta patch below.
Thanks. I'm going to include this if I have to resend for some reason.
No need. I already folded it in and it survived the built bot testing w/o complaints. About to push it out into tip timers/core as I have the posix timer stuff pending on top of it.
Thanks,
tglx
tip-bot for Christoph Hellwig
merge bot[tip:timers/core] signal: Remove non-uapi <asm/siginfo.h>
In reply to Christoph Hellwigsignal: Remove non-uapi <asm/siginfo.h>
Commit-ID: 6bc51cbaa9d75c7c240282da5ff270815caccac0 Gitweb: http://git.kernel.org/tip/6bc51cbaa9d75c7c240282da5ff270815caccac0 Author: Christoph Hellwig <[email protected]> AuthorDate: Sat, 3 Jun 2017 21:01:02 +0200 Committer: Thomas Gleixner <[email protected]> CommitDate: Sun, 4 Jun 2017 15:11:47 +0200
signal: Remove non-uapi <asm/siginfo.h>
By moving the kernel side __SI_* defintions right next to the userspace ones we can kill the non-uapi versions of <asm/siginfo.h> include include/asm-generic/siginfo.h and untangle the unholy mess of includes.
[ tglx: Removed uapi/asm/siginfo.h from m32r, microblaze, mn10300 and score ]
--- arch/arc/include/asm/Kbuild | 1 - arch/arc/include/uapi/asm/Kbuild | 2 ++ arch/arm/include/asm/Kbuild | 1 - arch/arm/include/uapi/asm/Kbuild | 2 ++ arch/c6x/include/asm/Kbuild | 1 - arch/c6x/include/uapi/asm/Kbuild | 1 + arch/cris/include/asm/Kbuild | 1 - arch/cris/include/uapi/asm/Kbuild | 2 ++ arch/h8300/include/asm/Kbuild | 1 - arch/h8300/include/uapi/asm/Kbuild | 2 ++ arch/hexagon/include/asm/Kbuild | 1 - arch/hexagon/include/uapi/asm/Kbuild | 2 ++ arch/ia64/include/asm/siginfo.h | 1 - arch/m32r/include/uapi/asm/Kbuild | 2 ++ arch/m32r/include/uapi/asm/siginfo.h | 6 ------ arch/m68k/include/asm/Kbuild | 1 - arch/m68k/include/uapi/asm/Kbuild | 1 + arch/microblaze/include/uapi/asm/Kbuild | 1 + arch/microblaze/include/uapi/asm/siginfo.h | 1 - arch/mn10300/include/uapi/asm/Kbuild | 2 ++ arch/mn10300/include/uapi/asm/siginfo.h | 1 - arch/nios2/include/asm/Kbuild | 1 - arch/nios2/include/uapi/asm/Kbuild | 1 + arch/openrisc/include/asm/Kbuild | 1 - arch/openrisc/include/uapi/asm/Kbuild | 2 ++ arch/score/include/uapi/asm/Kbuild | 2 ++ arch/score/include/uapi/asm/siginfo.h | 6 ------ arch/sh/include/asm/Kbuild | 1 - arch/sh/include/uapi/asm/Kbuild | 2 ++ arch/sparc/include/asm/siginfo.h | 1 - arch/unicore32/include/asm/Kbuild | 1 - arch/unicore32/include/uapi/asm/Kbuild | 1 + arch/xtensa/include/asm/Kbuild | 1 - arch/xtensa/include/uapi/asm/Kbuild | 1 + include/asm-generic/siginfo.h | 17 ----------------- include/uapi/asm-generic/siginfo.h | 15 +++++++++++++-- 36 files changed, 39 insertions(+), 47 deletions(-)
arch/arc/include/asm/Kbuild +0 -1
@@ -36,7 +36,6 @@ generic-y += preempt.h generic-y += resource.h generic-y += sembuf.h generic-y += shmbuf.h -generic-y += siginfo.h generic-y += socket.h generic-y += sockios.h generic-y += stat.h
arch/arc/include/uapi/asm/Kbuild +2 -0
@@ -1,2 +1,4 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm + +generic-y += siginfo.h
arch/arm/include/asm/Kbuild +0 -1
@@ -28,7 +28,6 @@ generic-y += segment.h generic-y += sembuf.h generic-y += serial.h generic-y += shmbuf.h -generic-y += siginfo.h generic-y += simd.h generic-y += sizes.h generic-y += socket.h
arch/arm/include/uapi/asm/Kbuild +2 -0
@@ -4,3 +4,5 @@ include include/uapi/asm-generic/Kbuild.asm genhdr-y += unistd-common.h genhdr-y += unistd-oabi.h genhdr-y += unistd-eabi.h + +generic-y += siginfo.h
arch/c6x/include/asm/Kbuild +0 -1
@@ -45,7 +45,6 @@ generic-y += sembuf.h generic-y += serial.h generic-y += shmbuf.h generic-y += shmparam.h -generic-y += siginfo.h generic-y += signal.h generic-y += socket.h generic-y += sockios.h
arch/c6x/include/uapi/asm/Kbuild +1 -0
@@ -2,3 +2,4 @@ include include/uapi/asm-generic/Kbuild.asm generic-y += kvm_para.h +generic-y += siginfo.h
arch/cris/include/asm/Kbuild +0 -1
@@ -36,7 +36,6 @@ generic-y += resource.h generic-y += sections.h generic-y += sembuf.h generic-y += shmbuf.h -generic-y += siginfo.h generic-y += socket.h generic-y += sockios.h generic-y += statfs.h
arch/cris/include/uapi/asm/Kbuild +2 -0
@@ -1,2 +1,4 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm + +generic-y += siginfo.h
arch/h8300/include/asm/Kbuild +0 -1
@@ -54,7 +54,6 @@ generic-y += serial.h generic-y += setup.h generic-y += shmbuf.h generic-y += shmparam.h -generic-y += siginfo.h generic-y += sizes.h generic-y += socket.h generic-y += sockios.h
arch/h8300/include/uapi/asm/Kbuild +2 -0
@@ -1,2 +1,4 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm + +generic-y += siginfo.h
arch/hexagon/include/asm/Kbuild +0 -1
@@ -41,7 +41,6 @@ generic-y += sembuf.h generic-y += serial.h generic-y += shmbuf.h generic-y += shmparam.h -generic-y += siginfo.h generic-y += sizes.h generic-y += socket.h generic-y += sockios.h
arch/hexagon/include/uapi/asm/Kbuild +2 -0
@@ -1,2 +1,4 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm + +generic-y += siginfo.h
arch/ia64/include/asm/siginfo.h deleted +0 -1
@@ -1 +0,0 @@ -#include <uapi/asm/siginfo.h>
arch/m32r/include/uapi/asm/Kbuild +2 -0
@@ -1,2 +1,4 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm + +generic-y += siginfo.h
arch/m32r/include/uapi/asm/siginfo.h deleted +0 -6
@@ -1,6 +0,0 @@ -#ifndef _M32R_SIGINFO_H -#define _M32R_SIGINFO_H - -#include <asm-generic/siginfo.h> - -#endif /* _M32R_SIGINFO_H */
arch/m68k/include/asm/Kbuild +0 -1
@@ -25,7 +25,6 @@ generic-y += preempt.h generic-y += resource.h generic-y += sections.h generic-y += shmparam.h -generic-y += siginfo.h generic-y += spinlock.h generic-y += statfs.h generic-y += termios.h
arch/m68k/include/uapi/asm/Kbuild +1 -0
@@ -5,6 +5,7 @@ generic-y += auxvec.h generic-y += msgbuf.h generic-y += sembuf.h generic-y += shmbuf.h +generic-y += siginfo.h generic-y += socket.h generic-y += sockios.h generic-y += termbits.h
arch/microblaze/include/uapi/asm/Kbuild +1 -0
@@ -2,3 +2,4 @@ include include/uapi/asm-generic/Kbuild.asm generic-y += types.h +generic-y += siginfo.h
arch/microblaze/include/uapi/asm/siginfo.h deleted +0 -1
@@ -1 +0,0 @@ -#include <asm-generic/siginfo.h>
arch/mn10300/include/uapi/asm/Kbuild +2 -0
@@ -1,2 +1,4 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm + +generic-y += siginfo.h
arch/mn10300/include/uapi/asm/siginfo.h deleted +0 -1
@@ -1 +0,0 @@ -#include <asm-generic/siginfo.h>
arch/nios2/include/asm/Kbuild +0 -1
@@ -47,7 +47,6 @@ generic-y += segment.h generic-y += sembuf.h generic-y += serial.h generic-y += shmbuf.h -generic-y += siginfo.h generic-y += signal.h generic-y += socket.h generic-y += sockios.h
arch/nios2/include/uapi/asm/Kbuild +1 -0
@@ -2,4 +2,5 @@ include include/uapi/asm-generic/Kbuild.asm generic-y += setup.h +generic-y += siginfo.h generic-y += ucontext.h
arch/openrisc/include/asm/Kbuild +0 -1
@@ -46,7 +46,6 @@ generic-y += sembuf.h generic-y += setup.h generic-y += shmbuf.h generic-y += shmparam.h -generic-y += siginfo.h generic-y += signal.h generic-y += socket.h generic-y += sockios.h
arch/openrisc/include/uapi/asm/Kbuild +2 -0
@@ -1,2 +1,4 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm + +generic-y += siginfo.h
arch/score/include/uapi/asm/Kbuild +2 -0
@@ -1,2 +1,4 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm + +generic-y += siginfo.h
arch/score/include/uapi/asm/siginfo.h deleted +0 -6
@@ -1,6 +0,0 @@ -#ifndef _ASM_SCORE_SIGINFO_H -#define _ASM_SCORE_SIGINFO_H - -#include <asm-generic/siginfo.h> - -#endif /* _ASM_SCORE_SIGINFO_H */
arch/sh/include/asm/Kbuild +0 -1
@@ -29,7 +29,6 @@ generic-y += rwsem.h generic-y += sembuf.h generic-y += serial.h generic-y += shmbuf.h -generic-y += siginfo.h generic-y += sizes.h generic-y += socket.h generic-y += statfs.h
arch/sh/include/uapi/asm/Kbuild +2 -0
@@ -1,2 +1,4 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm + +generic-y += siginfo.h
arch/sparc/include/asm/siginfo.h deleted +0 -1
@@ -1 +0,0 @@ -#include <uapi/asm/siginfo.h>
arch/unicore32/include/asm/Kbuild +0 -1
@@ -44,7 +44,6 @@ generic-y += serial.h generic-y += setup.h generic-y += shmbuf.h generic-y += shmparam.h -generic-y += siginfo.h generic-y += signal.h generic-y += sizes.h generic-y += socket.h
arch/unicore32/include/uapi/asm/Kbuild +1 -0
@@ -2,3 +2,4 @@ include include/uapi/asm-generic/Kbuild.asm generic-y += kvm_para.h +generic-y += siginfo.h
arch/xtensa/include/asm/Kbuild +0 -1
@@ -25,7 +25,6 @@ generic-y += preempt.h generic-y += resource.h generic-y += rwsem.h generic-y += sections.h -generic-y += siginfo.h generic-y += statfs.h generic-y += termios.h generic-y += topology.h
arch/xtensa/include/uapi/asm/Kbuild +1 -0
@@ -1,2 +1,3 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm +generic-y += siginfo.h
include/asm-generic/siginfo.h deleted +0 -17
@@ -1,17 +0,0 @@ -#ifndef _ASM_GENERIC_SIGINFO_H -#define _ASM_GENERIC_SIGINFO_H - -#include <uapi/asm-generic/siginfo.h> - -#define __SI_MASK 0xffff0000u -#define __SI_KILL (0 << 16) -#define __SI_TIMER (1 << 16) -#define __SI_POLL (2 << 16) -#define __SI_FAULT (3 << 16) -#define __SI_CHLD (4 << 16) -#define __SI_RT (5 << 16) -#define __SI_MESGQ (6 << 16) -#define __SI_SYS (7 << 16) -#define __SI_CODE (T ,N ) ((T) | ((N) & 0xffff)) - -#endif
include/uapi/asm-generic/siginfo.h +13 -2
@@ -151,7 +151,18 @@ typedef struct siginfo {#define si_arch _sifields._sigsys._arch#endif -#ifndef __KERNEL__ +#ifdef __KERNEL__ +#define __SI_MASK 0xffff0000u +#define __SI_KILL (0 << 16) +#define __SI_TIMER (1 << 16) +#define __SI_POLL (2 << 16) +#define __SI_FAULT (3 << 16) +#define __SI_CHLD (4 << 16) +#define __SI_RT (5 << 16) +#define __SI_MESGQ (6 << 16) +#define __SI_SYS (7 << 16) +#define __SI_CODE (T ,N ) ((T) | ((N) & 0xffff)) +#else /* __KERNEL__ */ #define __SI_KILL 0#define __SI_TIMER 0#define __SI_POLL 0
@@ -161,7 +172,7 @@ typedef struct siginfo {#define __SI_MESGQ 0#define __SI_SYS 0#define __SI_CODE (T ,N ) (N) -#endif +#endif /* __KERNEL__ */ /* * si_code values
Quoted 7 lines · Christoph Hellwig
We currently have uapi versions of <
asm/siginfo.h> which at least on a few architectures define bits of the userspace ABI before including an uapi asm-generic version, and also non-uapi versions which do almost nothing except for making sure other headers include the right uapi one before including an asm-generic that defined two prototypes and a few defines that aren't architecture specific in any.
Quoted 5 lines
This series completely gets rid of the non-uapi versions and cleans up various small bits on the way.
Note that Thomas has some posix-timers work overlapping with this, so it might make sense to take these through the tip tree.
Yes, makes sense. For asm-generic: