Re: [PATCH] provide y2038 safe socket constants
On Tue, 31 Mar 2020, Vineet Gupta via Libc-alpha wrote: > On 3/31/20 1:45 PM, Joseph Myers wrote: > > I'm concerned the present patch is wrong for x32, however; that has > > __TIMESIZE == 64 && __WORDSIZE == 32 but should use the old values; the > > patch should be using __SYSCALL_WORDSIZE when available in place of > > __WORDSIZE. > > Something like below ? > > -#if __TIMESIZE == 64 && __WORDSIZE == 32 > > +#if TIMESIZE == 64 && (__WORDSIZE == 32 \ > && (!defined __SYSCALL_WORDSIZE || __SYSCALL_WORDSIZE == 32)) Yes, that sort of thing. -- Joseph S. Myers jos...@codesourcery.com ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [PATCH] provide y2038 safe socket constants
On 3/31/20 1:45 PM, Joseph Myers wrote: > I'm concerned the present patch is wrong for x32, however; that has > __TIMESIZE == 64 && __WORDSIZE == 32 but should use the old values; the > patch should be using __SYSCALL_WORDSIZE when available in place of > __WORDSIZE. Something like below ? -#if __TIMESIZE == 64 && __WORDSIZE == 32 +#if TIMESIZE == 64 && (__WORDSIZE == 32 \ && (!defined __SYSCALL_WORDSIZE || __SYSCALL_WORDSIZE == 32)) Also is it ok to littler the code (multiple times, this patch and else where) with this or should we define a new __32BIT_ARCH_NOT_X32 or some such ? ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [PATCH] provide y2038 safe socket constants
On Tue, 31 Mar 2020, Florian Weimer wrote: > What about the parallel changes to the sysdeps overrides? I would > expect changes for hppa, mips, powerpc. (Not sure about the alpha > situation.) This fix is only about the case where the *default* ABI in glibc requires these different values. The header will need further changes (to use a conditional not based on __TIMESIZE) when _TIME_BITS=64 is supported on platforms that currently have 32-bit time_t. That's the point at which changes for other architectures are needed - once we have an appropriate conditional for "the current compilation uses 64-bit time but kernel long is 32-bit" (or something like that). I'm concerned the present patch is wrong for x32, however; that has __TIMESIZE == 64 && __WORDSIZE == 32 but should use the old values; the patch should be using __SYSCALL_WORDSIZE when available in place of __WORDSIZE. -- Joseph S. Myers jos...@codesourcery.com ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [PATCH] provide y2038 safe socket constants
+CC libc-alpha which got lost in the thread. On 3/31/20 1:18 PM, Florian Weimer wrote: > * Vineet Gupta: > >> On 3/31/20 12:34 PM, Florian Weimer wrote: >>> What about the parallel changes to the sysdeps overrides? I would> expect >>> changes for hppa, mips, powerpc. (Not sure about the alpha >>> situation.) >> >> This patch fixes the existing/future asm-generic ABI enabled arches >> and the ones you refer to are not. So IMHO that would be a separate >> patch if at all. > > Ahh, I think the commit message could make this clearer (although it > it's somewhat implied). Sure I can make it more explicit. > The commit message also lacks a period at the > end. Will fix for v2. > But is the conditional correct for x32? It has to be keep using the > old macro definitions. I was not sure as some of the other patches in area don't seem to do that. Hence I CC'ed Stephan who had earlier commented on x32. ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [PATCH] provide y2038 safe socket constants
* Vineet Gupta: > On 3/31/20 12:34 PM, Florian Weimer wrote: >> What about the parallel changes to the sysdeps overrides? I would> expect >> changes for hppa, mips, powerpc. (Not sure about the alpha >> situation.) > > This patch fixes the existing/future asm-generic ABI enabled arches > and the ones you refer to are not. So IMHO that would be a separate > patch if at all. Ahh, I think the commit message could make this clearer (although it it's somewhat implied). The commit message also lacks a period at the end. But is the conditional correct for x32? It has to be keep using the old macro definitions. ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [PATCH] provide y2038 safe socket constants
On 3/31/20 12:34 PM, Florian Weimer wrote: > What about the parallel changes to the sysdeps overrides? I would> expect > changes for hppa, mips, powerpc. (Not sure about the alpha > situation.) This patch fixes the existing/future asm-generic ABI enabled arches and the ones you refer to are not. So IMHO that would be a separate patch if at all. But if they do need fixing, I'm all up for it - except that I'm not sure if their ABI is changing too. Which brings us (me) to a fundamental question, how are those arches going to be made y2038 safe (me goes and reads the big wiki page) Thx, -Vineet ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [PATCH] provide y2038 safe socket constants
* Vineet Gupta via Libc-alpha: > These will be used by upcoming RV32 and ARC ports and any future ports > > Signed-off-by: Vineet Gupta > --- > sysdeps/unix/sysv/linux/bits/socket-constants.h | 14 -- > 1 file changed, 12 insertions(+), 2 deletions(-) > > diff --git a/sysdeps/unix/sysv/linux/bits/socket-constants.h > b/sysdeps/unix/sysv/linux/bits/socket-constants.h > index 9dcc19cd5380..8a48ae7d0ca2 100644 > --- a/sysdeps/unix/sysv/linux/bits/socket-constants.h > +++ b/sysdeps/unix/sysv/linux/bits/socket-constants.h What about the parallel changes to the sysdeps overrides? I would expect changes for hppa, mips, powerpc. (Not sure about the alpha situation.) ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [PATCH] provide y2038 safe socket constants
ping ! On 3/28/20 9:16 PM, Vineet Gupta wrote: > These will be used by upcoming RV32 and ARC ports and any future ports > > Signed-off-by: Vineet Gupta > --- > sysdeps/unix/sysv/linux/bits/socket-constants.h | 14 -- > 1 file changed, 12 insertions(+), 2 deletions(-) > > diff --git a/sysdeps/unix/sysv/linux/bits/socket-constants.h > b/sysdeps/unix/sysv/linux/bits/socket-constants.h > index 9dcc19cd5380..8a48ae7d0ca2 100644 > --- a/sysdeps/unix/sysv/linux/bits/socket-constants.h > +++ b/sysdeps/unix/sysv/linux/bits/socket-constants.h > @@ -20,6 +20,8 @@ > # error "Never include directly; use > instead." > #endif > > +#include > + > #define SOL_SOCKET 1 > #define SO_ACCEPTCONN 30 > #define SO_BROADCAST 6 > @@ -30,9 +32,17 @@ > #define SO_OOBINLINE 10 > #define SO_RCVBUF 8 > #define SO_RCVLOWAT 18 > -#define SO_RCVTIMEO 20 > +#if __TIMESIZE == 64 && __WORDSIZE == 32 > +# define SO_RCVTIMEO 66 > +#else > +# define SO_RCVTIMEO 20 > +#endif > #define SO_REUSEADDR 2 > #define SO_SNDBUF 7 > #define SO_SNDLOWAT 19 > -#define SO_SNDTIMEO 21 > +#if __TIMESIZE == 64 && __WORDSIZE == 32 > +# define SO_SNDTIMEO 67 > +#else > +# define SO_SNDTIMEO 21 > +#endif > #define SO_TYPE 3 > ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc