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

2018-11-30 Thread Willem de Bruijn
On Fri, Nov 30, 2018 at 5:43 PM Deepa Dinamani wrote: > > On Sun, Nov 25, 2018 at 6:33 AM Willem de Bruijn > wrote: > > > > On Sun, Nov 25, 2018 at 12:28 AM Deepa Dinamani > > wrote: > > > > > > > > > + if (type == SO_TIMESTAMP_NEW || type == SO_TIMESTAMPNS_NEW) > > > > > > +

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

2018-11-30 Thread Deepa Dinamani
On Sun, Nov 25, 2018 at 6:33 AM Willem de Bruijn wrote: > > On Sun, Nov 25, 2018 at 12:28 AM Deepa Dinamani > wrote: > > > > > > > + if (type == SO_TIMESTAMP_NEW || type == SO_TIMESTAMPNS_NEW) > > > > > + sock_set_flag(sk, SOCK_TSTAMP_NEW); > > > > > + else > > > > > +

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

2018-11-25 Thread Willem de Bruijn
> > > The existing timestamp options: SO_TIMESTAMP* fail to provide proper > > > timestamps beyond year 2038 on 32 bit ABIs. > > > But, these work fine on 64 bit native ABIs. > > > So now we need a way of updating these timestamps so that we do not > > > break existing userspace: 64 bit ABIs

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

2018-11-25 Thread Arnd Bergmann
On Sun, Nov 25, 2018 at 3:33 PM Willem de Bruijn wrote: > On Sun, Nov 25, 2018 at 12:28 AM Deepa Dinamani > wrote: > > So failing here means adding a bunch of ifdef's to verify it is not > > executing on 64 bit arch or something like x32. > > The code as is adds branches on platforms that do

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

2018-11-25 Thread Willem de Bruijn
> > > > Same for the tcp case above, really, and in the case of the next patch > > > > for SO_TIMESTAMPING_NEW > > > > > > That naming convention, ..._2038, is not the nicest, of course. That > > > is not the relevant bit in the above comment. > > it could be __sock_recv_timestamp64(). > But,

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

2018-11-25 Thread Willem de Bruijn
On Sun, Nov 25, 2018 at 12:28 AM Deepa Dinamani wrote: > > > > > + if (type == SO_TIMESTAMP_NEW || type == SO_TIMESTAMPNS_NEW) > > > > + sock_set_flag(sk, SOCK_TSTAMP_NEW); > > > > + else > > > > + sock_reset_flag(sk, SOCK_TSTAMP_NEW); > > > > + > > > > > >

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

2018-11-24 Thread Deepa Dinamani
A couple of comments I missed: > > > > /* > > > > * called from sock_recv_timestamp() if sock_flag(sk, SOCK_RCVTSTAMP) > > > > * or sock_flag(sk, SOCK_RCVTSTAMPNS) > > > > @@ -719,19 +751,8 @@ void __sock_recv_timestamp(struct msghdr *msg, > > > > struct sock *sk, > > > >

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

2018-11-24 Thread Deepa Dinamani
> > > + if (type == SO_TIMESTAMP_NEW || type == SO_TIMESTAMPNS_NEW) > > > + sock_set_flag(sk, SOCK_TSTAMP_NEW); > > > + else > > > + sock_reset_flag(sk, SOCK_TSTAMP_NEW); > > > + > > > > if adding a boolean whether the socket uses new or old-style > >

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

2018-11-24 Thread Willem de Bruijn
On Sat, Nov 24, 2018 at 10:59 PM Willem de Bruijn wrote: > > On Sat, Nov 24, 2018 at 3:58 AM 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