Message ID | 20200507142319.1978172-4-adhemerval.zanella@linaro.org |
---|---|
State | New |
Headers | show |
Series | [v2,1/5] signal: Add signum-{generic,arch}.h | expand |
On Thu, 7 May 2020, Adhemerval Zanella via Libc-alpha wrote: > MIPS support up to 96 real time signal, instead of current 95. [...] > diff --git a/sysdeps/unix/sysv/linux/mips/bits/signum-arch.h b/sysdeps/unix/sysv/linux/mips/bits/signum-arch.h > index c500d38322..5eeed367e8 100644 > --- a/sysdeps/unix/sysv/linux/mips/bits/signum-arch.h > +++ b/sysdeps/unix/sysv/linux/mips/bits/signum-arch.h > @@ -60,6 +60,9 @@ > > /* By default no real-time signals are supported. */ > #define __SIGRTMIN 32 > -#define __SIGRTMAX 127 > +#define __SIGRTMAX 128 > + > +/* MIPS used to define __SIGRTMAX as 127 and exported NSIG as 128. */ > +#define __OLD_NSIG 128 I don't think 128 can reliably work as a signal number as bit 7 in the exit status denotes a core dump has been made and only bits 6:0 there hold the signal number, which is why the upper limit of the range has been set to 127. See also the WTERMSIG and WCOREDUMP macros. Besides the range of 32..127 actually spans 96 individual signal numbers. Maciej
On 12/05/2020 14:00, Maciej W. Rozycki wrote: > On Thu, 7 May 2020, Adhemerval Zanella via Libc-alpha wrote: > >> MIPS support up to 96 real time signal, instead of current 95. > [...] >> diff --git a/sysdeps/unix/sysv/linux/mips/bits/signum-arch.h b/sysdeps/unix/sysv/linux/mips/bits/signum-arch.h >> index c500d38322..5eeed367e8 100644 >> --- a/sysdeps/unix/sysv/linux/mips/bits/signum-arch.h >> +++ b/sysdeps/unix/sysv/linux/mips/bits/signum-arch.h >> @@ -60,6 +60,9 @@ >> >> /* By default no real-time signals are supported. */ >> #define __SIGRTMIN 32 >> -#define __SIGRTMAX 127 >> +#define __SIGRTMAX 128 >> + >> +/* MIPS used to define __SIGRTMAX as 127 and exported NSIG as 128. */ >> +#define __OLD_NSIG 128 > > I don't think 128 can reliably work as a signal number as bit 7 in the > exit status denotes a core dump has been made and only bits 6:0 there hold > the signal number, which is why the upper limit of the range has been set > to 127. See also the WTERMSIG and WCOREDUMP macros. > > Besides the range of 32..127 actually spans 96 individual signal numbers. > > Maciej > Indeed this change won't work on mips and this change indeed is not required. I withdrew this patch, thanks for checking on this.
On 5/7/20 10:23 AM, Adhemerval Zanella via Libc-alpha wrote: > MIPS support up to 96 real time signal, instead of current 95. > > Checked with a mips*-linux-gnu build. I'm reviewing. In the meantime testing on 64-bit and 32-bit x86 was clean. bmg run is clean (minus aarch64 fail fixed today with check-localplt fix) Tested-by: Carlos O'Donell <carlos@redhat.com> > --- > sysdeps/unix/sysv/linux/alpha/bits/signum-arch.h | 1 + > sysdeps/unix/sysv/linux/bits/signum-arch.h | 1 + > sysdeps/unix/sysv/linux/hppa/bits/signum-arch.h | 1 + > sysdeps/unix/sysv/linux/mips/bits/signum-arch.h | 5 ++++- > sysdeps/unix/sysv/linux/siglist-compat.c | 2 +- > sysdeps/unix/sysv/linux/sparc/bits/signum-arch.h | 1 + > 6 files changed, 9 insertions(+), 2 deletions(-) > > diff --git a/sysdeps/unix/sysv/linux/alpha/bits/signum-arch.h b/sysdeps/unix/sysv/linux/alpha/bits/signum-arch.h > index e3aef44e78..bde71f481c 100644 > --- a/sysdeps/unix/sysv/linux/alpha/bits/signum-arch.h > +++ b/sysdeps/unix/sysv/linux/alpha/bits/signum-arch.h > @@ -63,5 +63,6 @@ > > #define __SIGRTMIN 32 > #define __SIGRTMAX 64 > +#define __OLD_NSIG NSIG > > #endif /* <signal.h> included. */ > diff --git a/sysdeps/unix/sysv/linux/bits/signum-arch.h b/sysdeps/unix/sysv/linux/bits/signum-arch.h > index e21dc332ca..83047bffc6 100644 > --- a/sysdeps/unix/sysv/linux/bits/signum-arch.h > +++ b/sysdeps/unix/sysv/linux/bits/signum-arch.h > @@ -60,5 +60,6 @@ > > #define __SIGRTMIN 32 > #define __SIGRTMAX 64 > +#define __OLD_NSIG NSIG > > #endif /* <signal.h> included. */ > diff --git a/sysdeps/unix/sysv/linux/hppa/bits/signum-arch.h b/sysdeps/unix/sysv/linux/hppa/bits/signum-arch.h > index 364e57ec4a..88f14e675a 100644 > --- a/sysdeps/unix/sysv/linux/hppa/bits/signum-arch.h > +++ b/sysdeps/unix/sysv/linux/hppa/bits/signum-arch.h > @@ -65,5 +65,6 @@ > > #define __SIGRTMIN 32 > #define __SIGRTMAX 64 > +#define __OLD_NSIG NSIG > > #endif /* <signal.h> included. */ > diff --git a/sysdeps/unix/sysv/linux/mips/bits/signum-arch.h b/sysdeps/unix/sysv/linux/mips/bits/signum-arch.h > index c500d38322..5eeed367e8 100644 > --- a/sysdeps/unix/sysv/linux/mips/bits/signum-arch.h > +++ b/sysdeps/unix/sysv/linux/mips/bits/signum-arch.h > @@ -60,6 +60,9 @@ > > /* By default no real-time signals are supported. */ > #define __SIGRTMIN 32 > -#define __SIGRTMAX 127 > +#define __SIGRTMAX 128 > + > +/* MIPS used to define __SIGRTMAX as 127 and exported NSIG as 128. */ > +#define __OLD_NSIG 128 > > #endif /* <signal.h> included. */ > diff --git a/sysdeps/unix/sysv/linux/siglist-compat.c b/sysdeps/unix/sysv/linux/siglist-compat.c > index c322326a99..bc5c584ef3 100644 > --- a/sysdeps/unix/sysv/linux/siglist-compat.c > +++ b/sysdeps/unix/sysv/linux/siglist-compat.c > @@ -27,5 +27,5 @@ DEFINE_COMPAT_SIGLIST (64, GLIBC_2_1) > #endif > > #if SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_32) > -DEFINE_COMPAT_SIGLIST (NSIG, GLIBC_2_3_3) > +DEFINE_COMPAT_SIGLIST (__OLD_NSIG, GLIBC_2_3_3) > #endif > diff --git a/sysdeps/unix/sysv/linux/sparc/bits/signum-arch.h b/sysdeps/unix/sysv/linux/sparc/bits/signum-arch.h > index a19b5100cb..2f4f26d617 100644 > --- a/sysdeps/unix/sysv/linux/sparc/bits/signum-arch.h > +++ b/sysdeps/unix/sysv/linux/sparc/bits/signum-arch.h > @@ -62,5 +62,6 @@ > > #define __SIGRTMIN 32 > #define __SIGRTMAX 64 > +#define __OLD_NSIG NSIG > > #endif /* <signal.h> included. */ >
On 12/05/2020 14:41, Carlos O'Donell wrote: > On 5/7/20 10:23 AM, Adhemerval Zanella via Libc-alpha wrote: >> MIPS support up to 96 real time signal, instead of current 95. >> >> Checked with a mips*-linux-gnu build. > > I'm reviewing. > > In the meantime testing on 64-bit and 32-bit x86 was clean. > > bmg run is clean (minus aarch64 fail fixed today with check-localplt fix) > > Tested-by: Carlos O'Donell <carlos@redhat.com> Thanks, but as Maciej W. Rozycki has pointed out this patch is not suitable. I have withdrew it.
On 5/12/20 1:50 PM, Adhemerval Zanella wrote: > > > On 12/05/2020 14:41, Carlos O'Donell wrote: >> On 5/7/20 10:23 AM, Adhemerval Zanella via Libc-alpha wrote: >>> MIPS support up to 96 real time signal, instead of current 95. >>> >>> Checked with a mips*-linux-gnu build. >> >> I'm reviewing. >> >> In the meantime testing on 64-bit and 32-bit x86 was clean. >> >> bmg run is clean (minus aarch64 fail fixed today with check-localplt fix) >> >> Tested-by: Carlos O'Donell <carlos@redhat.com> > > Thanks, but as Maciej W. Rozycki has pointed out this patch is > not suitable. I have withdrew it. Thanks. Marked dropped.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/signum-arch.h b/sysdeps/unix/sysv/linux/alpha/bits/signum-arch.h index e3aef44e78..bde71f481c 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/signum-arch.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/signum-arch.h @@ -63,5 +63,6 @@ #define __SIGRTMIN 32 #define __SIGRTMAX 64 +#define __OLD_NSIG NSIG #endif /* <signal.h> included. */ diff --git a/sysdeps/unix/sysv/linux/bits/signum-arch.h b/sysdeps/unix/sysv/linux/bits/signum-arch.h index e21dc332ca..83047bffc6 100644 --- a/sysdeps/unix/sysv/linux/bits/signum-arch.h +++ b/sysdeps/unix/sysv/linux/bits/signum-arch.h @@ -60,5 +60,6 @@ #define __SIGRTMIN 32 #define __SIGRTMAX 64 +#define __OLD_NSIG NSIG #endif /* <signal.h> included. */ diff --git a/sysdeps/unix/sysv/linux/hppa/bits/signum-arch.h b/sysdeps/unix/sysv/linux/hppa/bits/signum-arch.h index 364e57ec4a..88f14e675a 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/signum-arch.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/signum-arch.h @@ -65,5 +65,6 @@ #define __SIGRTMIN 32 #define __SIGRTMAX 64 +#define __OLD_NSIG NSIG #endif /* <signal.h> included. */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/signum-arch.h b/sysdeps/unix/sysv/linux/mips/bits/signum-arch.h index c500d38322..5eeed367e8 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/signum-arch.h +++ b/sysdeps/unix/sysv/linux/mips/bits/signum-arch.h @@ -60,6 +60,9 @@ /* By default no real-time signals are supported. */ #define __SIGRTMIN 32 -#define __SIGRTMAX 127 +#define __SIGRTMAX 128 + +/* MIPS used to define __SIGRTMAX as 127 and exported NSIG as 128. */ +#define __OLD_NSIG 128 #endif /* <signal.h> included. */ diff --git a/sysdeps/unix/sysv/linux/siglist-compat.c b/sysdeps/unix/sysv/linux/siglist-compat.c index c322326a99..bc5c584ef3 100644 --- a/sysdeps/unix/sysv/linux/siglist-compat.c +++ b/sysdeps/unix/sysv/linux/siglist-compat.c @@ -27,5 +27,5 @@ DEFINE_COMPAT_SIGLIST (64, GLIBC_2_1) #endif #if SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_32) -DEFINE_COMPAT_SIGLIST (NSIG, GLIBC_2_3_3) +DEFINE_COMPAT_SIGLIST (__OLD_NSIG, GLIBC_2_3_3) #endif diff --git a/sysdeps/unix/sysv/linux/sparc/bits/signum-arch.h b/sysdeps/unix/sysv/linux/sparc/bits/signum-arch.h index a19b5100cb..2f4f26d617 100644 --- a/sysdeps/unix/sysv/linux/sparc/bits/signum-arch.h +++ b/sysdeps/unix/sysv/linux/sparc/bits/signum-arch.h @@ -62,5 +62,6 @@ #define __SIGRTMIN 32 #define __SIGRTMAX 64 +#define __OLD_NSIG NSIG #endif /* <signal.h> included. */