Re: [Y2038] [PATCH v2 6/8] socket: Add SO_TIMESTAMP[NS]_NEW

2018-12-18 Thread Deepa Dinamani
On Tue, Dec 18, 2018 at 8:33 AM Arnd Bergmann wrote: > > On Sat, Dec 15, 2018 at 7:52 PM Willem de Bruijn > wrote: > > > > > 3 reasons for not doing this: > > > > > > 1. We do not want to break userspace. If we move this to > > > linux/socket.h all the userspace programs now have to include > >

Re: [Y2038] [PATCH v2 6/8] socket: Add SO_TIMESTAMP[NS]_NEW

2018-12-18 Thread Arnd Bergmann
On Sat, Dec 15, 2018 at 7:52 PM Willem de Bruijn wrote: > > > 3 reasons for not doing this: > > > > 1. We do not want to break userspace. If we move this to > > linux/socket.h all the userspace programs now have to include > > linux/socket.h or get this definition through a new libc. > > 2. All

Re: [Y2038] [PATCH v2 6/8] socket: Add SO_TIMESTAMP[NS]_NEW

2018-12-15 Thread Deepa Dinamani
> > Also for the other comment. The reason the conditionals were not > > consistent is because they were not consistent to begin with. > > The only difference I see is an inversion of the test. Nesting order > is the same: > > int need_software_tstamp = sock_flag(sk, SOCK_RCVTSTAMP); >

Re: [Y2038] [PATCH v2 6/8] socket: Add SO_TIMESTAMP[NS]_NEW

2018-12-15 Thread Willem de Bruijn
> 3 reasons for not doing this: > > 1. We do not want to break userspace. If we move this to > linux/socket.h all the userspace programs now have to include > linux/socket.h or get this definition through a new libc. > 2. All the socket options are together in the file asm/socket.h. It > doesn't

Re: [Y2038] [PATCH v2 6/8] socket: Add SO_TIMESTAMP[NS]_NEW

2018-12-15 Thread Deepa Dinamani
On Sat, Dec 15, 2018 at 7:12 AM Willem de Bruijn wrote: > > On Fri, Dec 14, 2018 at 8:07 PM Deepa Dinamani wrote: > > > > > > diff --git a/arch/alpha/include/uapi/asm/socket.h > > > > b/arch/alpha/include/uapi/asm/socket.h > > > > index 00e45c80e574..352e3dc0b3d9 100644 > > > > ---

Re: [Y2038] [PATCH v2 6/8] socket: Add SO_TIMESTAMP[NS]_NEW

2018-12-15 Thread Willem de Bruijn
On Fri, Dec 14, 2018 at 8:07 PM Deepa Dinamani wrote: > > > > diff --git a/arch/alpha/include/uapi/asm/socket.h > > > b/arch/alpha/include/uapi/asm/socket.h > > > index 00e45c80e574..352e3dc0b3d9 100644 > > > --- a/arch/alpha/include/uapi/asm/socket.h > > > +++

Re: [Y2038] [PATCH v2 6/8] socket: Add SO_TIMESTAMP[NS]_NEW

2018-12-12 Thread Willem de Bruijn
> This did not address yet the previous comments on consistency and > unnecessary code churn. > > The existing logic to differentiate SO_TIMESTAMP from SO_TIMESTAMPNS > in both tcp_recv_timestamp and __sock_recv_timestamp is > > if (sock_flag(sk, SOCK_RCVTSTAMP)) { > if (sock_flag(sk,

Re: [Y2038] [PATCH v2 6/8] socket: Add SO_TIMESTAMP[NS]_NEW

2018-12-12 Thread Willem de Bruijn
On Tue, Dec 11, 2018 at 3:30 PM Deepa Dinamani wrote: > > 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

[Y2038] [PATCH v2 6/8] socket: Add SO_TIMESTAMP[NS]_NEW

2018-12-11 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