Re: [Y2038] [PATCH net-next v4 02/12] socket: move compat timeout handling into sock.c

2019-02-01 Thread Deepa Dinamani
> On Feb 2, 2019, at 12:28 AM, Willem de Bruijn > wrote: > >> On Fri, Feb 1, 2019 at 7:48 AM Deepa Dinamani wrote: >> >> From: Arnd Bergmann >> >> This is a cleanup to prepare for the addition of 64-bit time_t >> in O_SNDTIMEO/O_RCVTIMEO. The existing compat handler seems >> unnecessarily

Re: [Y2038] [PATCH net-next v4 00/12] net: y2038-safe socket timestamps

2019-02-01 Thread Willem de Bruijn
On Fri, Feb 1, 2019 at 7:47 AM Deepa Dinamani wrote: > > The series introduces new socket timestamps that are > y2038 safe. > > The time data types used for the existing socket timestamp > options: SO_TIMESTAMP, SO_TIMESTAMPNS and SO_TIMESTAMPING > are not y2038 safe. The series introduces

Re: [Y2038] [PATCH net-next v4 02/12] socket: move compat timeout handling into sock.c

2019-02-01 Thread Willem de Bruijn
On Fri, Feb 1, 2019 at 7:48 AM Deepa Dinamani wrote: > > From: Arnd Bergmann > > This is a cleanup to prepare for the addition of 64-bit time_t > in O_SNDTIMEO/O_RCVTIMEO. The existing compat handler seems > unnecessarily complex and error-prone, moving it all into the > main

[Y2038] [PATCH net-next v4 12/12] sock: Add SO_RCVTIMEO_NEW and SO_SNDTIMEO_NEW

2019-02-01 Thread Deepa Dinamani
Add new socket timeout options that are y2038 safe. Signed-off-by: Deepa Dinamani Cc: ccaul...@redhat.com Cc: da...@davemloft.net Cc: del...@gmx.de Cc: pau...@samba.org Cc: r...@linux-mips.org Cc: r...@twiddle.net Cc: cluster-de...@redhat.com Cc: linuxppc-...@lists.ozlabs.org Cc:

[Y2038] [PATCH net-next v4 11/12] socket: Rename SO_RCVTIMEO/ SO_SNDTIMEO with _OLD suffixes

2019-02-01 Thread Deepa Dinamani
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

[Y2038] [PATCH net-next v4 08/12] socket: Add SO_TIMESTAMP[NS]_NEW

2019-02-01 Thread Deepa Dinamani
Add SO_TIMESTAMP_NEW and SO_TIMESTAMPNS_NEW variants of socket timestamp options. These are the y2038 safe versions of the SO_TIMESTAMP_OLD and SO_TIMESTAMPNS_OLD for all architectures. Note that the format of scm_timestamping.ts[0] is not changed in this patch. Signed-off-by: Deepa Dinamani

[Y2038] [PATCH net-next v4 10/12] socket: Update timestamping Documentation

2019-02-01 Thread Deepa Dinamani
With the new y2038 safe timestamping options added, update the documentation to reflect the changes. Signed-off-by: Deepa Dinamani Acked-by: Willem de Bruijn --- Documentation/networking/timestamping.txt | 43 --- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git

[Y2038] [PATCH net-next v4 09/12] socket: Add SO_TIMESTAMPING_NEW

2019-02-01 Thread Deepa Dinamani
Add SO_TIMESTAMPING_NEW variant of socket timestamp options. This is the y2038 safe versions of the SO_TIMESTAMPING_OLD for all architectures. Signed-off-by: Deepa Dinamani Cc: ch...@zankel.net Cc: fenghua...@intel.com Cc: r...@twiddle.net Cc: t...@linutronix.de Cc: ubr...@linux.ibm.com Cc:

[Y2038] [PATCH net-next v4 07/12] socket: Add struct __kernel_sock_timeval

2019-02-01 Thread Deepa Dinamani
The new type is meant to be used as a y2038 safe structure to be used as part of cmsg data. Presently the SO_TIMESTAMP socket option uses struct timeval for timestamps. This is not y2038 safe. Subsequent patches in the series add new y2038 safe socket option to be used in the place of

[Y2038] [PATCH net-next v4 06/12] socket: Use old_timeval types for socket timestamps

2019-02-01 Thread Deepa Dinamani
As part of y2038 solution, all internal uses of struct timeval are replaced by struct __kernel_old_timeval and struct compat_timeval by struct old_timeval32. Make socket timestamps use these new types. This is mainly to be able to verify that the kernel build is y2038 safe when such non y2038

[Y2038] [PATCH net-next v4 05/12] arch: sparc: Override struct __kernel_old_timeval

2019-02-01 Thread Deepa Dinamani
struct __kernel_old_timeval is supposed to have the same layout as struct timeval. But, it was inadvarently missed that __kernel_suseconds has a different definition for sparc64. Provide an asm-specific override that fixes it. Reported-by: Arnd Bergmann Suggested-by: Arnd Bergmann

[Y2038] [PATCH net-next v4 04/12] sockopt: Rename SO_TIMESTAMP* to SO_TIMESTAMP*_OLD

2019-02-01 Thread Deepa Dinamani
SO_TIMESTAMP, SO_TIMESTAMPNS and SO_TIMESTAMPING options, the way they are currently defined, are not y2038 safe. Subsequent patches in the series add new y2038 safe versions of these options which provide 64 bit timestamps on all architectures uniformly. Hence, rename existing options with OLD

[Y2038] [PATCH net-next v4 03/12] arch: Use asm-generic/socket.h when possible

2019-02-01 Thread Deepa Dinamani
Many architectures maintain an arch specific copy of the file even though there are no differences with the asm-generic one. Allow these architectures to use the generic one instead. Signed-off-by: Deepa Dinamani Acked-by: Max Filippov Acked-by: Heiko Carstens Cc: ch...@zankel.net Cc:

[Y2038] [PATCH net-next v4 02/12] socket: move compat timeout handling into sock.c

2019-02-01 Thread Deepa Dinamani
From: Arnd Bergmann This is a cleanup to prepare for the addition of 64-bit time_t in O_SNDTIMEO/O_RCVTIMEO. The existing compat handler seems unnecessarily complex and error-prone, moving it all into the main setsockopt()/getsockopt() implementation requires half as much code and is easier to

[Y2038] [PATCH net-next v4 00/12] net: y2038-safe socket timestamps

2019-02-01 Thread Deepa Dinamani
The series introduces new socket timestamps that are y2038 safe. The time data types used for the existing socket timestamp options: SO_TIMESTAMP, SO_TIMESTAMPNS and SO_TIMESTAMPING are not y2038 safe. The series introduces SO_TIMESTAMP_NEW, SO_TIMESTAMPNS_NEW and SO_TIMESTAMPING_NEW to replace