[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87o97pku1x.fsf@concordia.ellerman.id.au>
Date: Wed, 06 Feb 2019 22:58:18 +1100
From: Michael Ellerman <mpe@...erman.id.au>
To: Deepa Dinamani <deepa.kernel@...il.com>, davem@...emloft.net,
linux-kernel@...r.kernel.org
Cc: netdev@...r.kernel.org, arnd@...db.de, y2038@...ts.linaro.org,
ccaulfie@...hat.com, deller@....de, paulus@...ba.org,
ralf@...ux-mips.org, rth@...ddle.net, cluster-devel@...hat.com,
linuxppc-dev@...ts.ozlabs.org, linux-alpha@...r.kernel.org,
linux-arch@...r.kernel.org, linux-mips@...r.kernel.org,
linux-parisc@...r.kernel.org, sparclinux@...r.kernel.org
Subject: Re: [PATCH net-next v5 11/12] socket: Rename SO_RCVTIMEO/ SO_SNDTIMEO with _OLD suffixes
Deepa Dinamani <deepa.kernel@...il.com> writes:
> SO_RCVTIMEO and SO_SNDTIMEO socket options use struct timeval
> as the time format. struct timeval is not y2038 safe.
> The subsequent patches in the series add support for new socket
> timeout options with _NEW suffix that will use y2038 safe
> data structures. Although the existing struct timeval layout
> is sufficiently wide to represent timeouts, because of the way
> libc will interpret time_t based on user defined flag, these
> new flags provide a way of having a structure that is the same
> for all architectures consistently.
> Rename the existing options with _OLD suffix forms so that the
> right option is enabled for userspace applications according
> to the architecture and time_t definition of libc.
>
> Signed-off-by: Deepa Dinamani <deepa.kernel@...il.com>
> Acked-by: Willem de Bruijn <willemb@...gle.com>
> Cc: ccaulfie@...hat.com
> Cc: deller@....de
> Cc: paulus@...ba.org
> Cc: ralf@...ux-mips.org
> Cc: rth@...ddle.net
> Cc: cluster-devel@...hat.com
> Cc: linuxppc-dev@...ts.ozlabs.org
> Cc: linux-alpha@...r.kernel.org
> Cc: linux-arch@...r.kernel.org
> Cc: linux-mips@...r.kernel.org
> Cc: linux-parisc@...r.kernel.org
> Cc: sparclinux@...r.kernel.org
> ---
> arch/alpha/include/uapi/asm/socket.h | 7 +++++--
> arch/mips/include/uapi/asm/socket.h | 6 ++++--
> arch/parisc/include/uapi/asm/socket.h | 6 ++++--
> arch/powerpc/include/uapi/asm/socket.h | 4 ++--
The powerpc changes look OK to me.
Acked-by: Michael Ellerman <mpe@...erman.id.au> (powerpc)
cheers
> diff --git a/arch/powerpc/include/uapi/asm/socket.h b/arch/powerpc/include/uapi/asm/socket.h
> index 94de465e0920..12aa0c43e775 100644
> --- a/arch/powerpc/include/uapi/asm/socket.h
> +++ b/arch/powerpc/include/uapi/asm/socket.h
> @@ -11,8 +11,8 @@
>
> #define SO_RCVLOWAT 16
> #define SO_SNDLOWAT 17
> -#define SO_RCVTIMEO 18
> -#define SO_SNDTIMEO 19
> +#define SO_RCVTIMEO_OLD 18
> +#define SO_SNDTIMEO_OLD 19
> #define SO_PASSCRED 20
> #define SO_PEERCRED 21
>
> diff --git a/include/uapi/asm-generic/socket.h b/include/uapi/asm-generic/socket.h
> index 2713e0fa68ef..c56b8b487c12 100644
> --- a/include/uapi/asm-generic/socket.h
> +++ b/include/uapi/asm-generic/socket.h
> @@ -30,8 +30,8 @@
> #define SO_PEERCRED 17
> #define SO_RCVLOWAT 18
> #define SO_SNDLOWAT 19
> -#define SO_RCVTIMEO 20
> -#define SO_SNDTIMEO 21
> +#define SO_RCVTIMEO_OLD 20
> +#define SO_SNDTIMEO_OLD 21
> #endif
>
> /* Security levels - as per NRL IPv6 - don't actually do anything */
> @@ -116,6 +116,8 @@
>
> #if !defined(__KERNEL__)
>
> +#define SO_RCVTIMEO SO_RCVTIMEO_OLD
> +#define SO_SNDTIMEO SO_SNDTIMEO_OLD
> #if __BITS_PER_LONG == 64 || (defined(__x86_64__) && defined(__ILP32__))
> /* on 64-bit and x32, avoid the ?: operator */
> #define SO_TIMESTAMP SO_TIMESTAMP_OLD
Powered by blists - more mailing lists