[Y2038] [PATCH 5/8] socket: Use old_timeval types for socket timestamps

2018-11-23 Thread Deepa Dinamani
safe types are not supported anymore. Signed-off-by: Deepa Dinamani Cc: i...@linux-pingi.de --- drivers/isdn/mISDN/socket.c | 2 +- include/linux/skbuff.h | 6 +++--- net/bluetooth/hci_sock.c| 4 ++-- net/compat.c| 6 +++--- net/ipv4/tcp.c | 2 +- net/rds/recv.c

[Y2038] [PATCH 1/8] arch: Use asm-generic/socket.h when possible

2018-11-23 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 Cc: ch...@zankel.net Cc: fenghua...@intel.com Cc: t...@linutronix.de Cc: schwidef

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

2018-11-23 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 Cc

[Y2038] [PATCH 6/8] socket: Add struct sock_timeval

2018-11-23 Thread Deepa Dinamani
of SO_TIMESTAMP_OLD. struct sock_timeval will be used as the timestamp format at that time. struct sock_timeval also maintains the same layout across 32 bit and 64 bit ABIs. Signed-off-by: Deepa Dinamani --- include/uapi/linux/time.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/uapi/linux

[Y2038] [PATCH 8/8] socket: Add SO_TIMESTAMPING_NEW

2018-11-23 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 0/8] net: y2038-safe socket timestamps

2018-11-23 Thread Deepa Dinamani
not rely on SOCK_RCVTSTAMP. 4. Introduce y2038 safe types for socket timestamp. 5. Introduce new y2038 safe socket options SO/SCM_TIMESTAMP*_NEW. Deepa Dinamani (8): arch: Use asm-generic/socket.h when possible sockopt: Rename SO_TIMESTAMP* to SO_TIMESTAMP*_OLD socket: Disentangle

Re: [Y2038] [PATCH 3/8] socket: Disentangle SOCK_RCVTSTAMPNS from SOCK_RCVTSTAMP

2018-11-24 Thread Deepa Dinamani
On Sat, Nov 24, 2018 at 7:59 PM Willem de Bruijn wrote: > > On Sat, Nov 24, 2018 at 3:59 AM Deepa Dinamani wrote: > > > > SOCK_RCVTSTAMPNS is never set alone. SOCK_RCVTSTAMP > > is always set along with SOCK_RCVTSTAMPNS. This leads to > > checking for two flag st

Re: [Y2038] [PATCH 8/8] socket: Add SO_TIMESTAMPING_NEW

2018-11-24 Thread Deepa Dinamani
> > + new_tstamp = sock_flag(sk, SOCK_TSTAMP_NEW); > > + if (new_tstamp) > > nit: no need for explicit variable Sure, will drop it. -Deepa ___ Y2038 mailing list Y2038@lists.linaro.org

Re: [Y2038] [PATCH 6/8] socket: Add struct sock_timeval

2018-11-24 Thread Deepa Dinamani
On Sat, Nov 24, 2018 at 11:38 AM Willem de Bruijn wrote: > > On Sat, Nov 24, 2018 at 4:00 AM Deepa Dinamani wrote: > > > > 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 soc

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 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 6/8] socket: Add struct sock_timeval

2018-11-26 Thread Deepa Dinamani
> I think we want signed types to keep it closer to what we > have today with 'timeval'. as long as linux/types.h is included > first (it is). > > Between __s64 or long long, I don't think it makes a difference, > so let's just go with Willem's suggestion. We already rely on > 'long long' being

Re: [Y2038] [PATCH] socket: move compat timeout handling into sock.c

2019-01-08 Thread Deepa Dinamani
implementation requires half > as much code and is easier to extend. > > 32-bit user space can now use old_timeval32 on both 32-bit > and 64-bit machines, while 64-bit code can use > __old_kernel_timeval. > > Signed-off-by: Arnd Bergmann This will make the other series so muc

Re: [Y2038] [PATCH 2/3] socket: Rename SO_RCVTIMEO/ SO_SNDTIMEO with _OLD suffixes

2019-01-08 Thread Deepa Dinamani
On Tue, Jan 8, 2019 at 12:04 PM Arnd Bergmann wrote: > > On Tue, Jan 8, 2019 at 6:24 AM Deepa Dinamani wrote: > > > > SO_RCVTIMEO and SO_SNDTIMEO socket options use struct timeval > > as the time format. struct timeval is not y2038 safe. > > The subsequent pat

[Y2038] [PATCH v3 0/8] net: y2038-safe socket timestamps

2019-01-07 Thread Deepa Dinamani
* Renamed sock_timeval to __kernel_sock_timeval * Updated a few comments * Added documentation changes Deepa Dinamani (8): arch: Use asm-generic/socket.h when possible sockopt: Rename SO_TIMESTAMP* to SO_TIMESTAMP*_OLD arch: sparc: Override struct __kernel_old_timeval socket: Use old_timeval

[Y2038] [PATCH v3 2/8] sockopt: Rename SO_TIMESTAMP* to SO_TIMESTAMP*_OLD

2019-01-07 Thread Deepa Dinamani
tag suffixes. Also note that kernel will not use the untagged SO_TIMESTAMP* and SCM_TIMESTAMP* options internally anymore. Signed-off-by: Deepa Dinamani Cc: del...@gmx.de Cc: dhowe...@redhat.com Cc: j...@parisc-linux.org Cc: r...@linux-mips.org Cc: r...@twiddle.net Cc: linux-...@lists.infradead.org

[Y2038] [PATCH v3 4/8] socket: Use old_timeval types for socket timestamps

2019-01-07 Thread Deepa Dinamani
safe types are not supported anymore. Signed-off-by: Deepa Dinamani Cc: i...@linux-pingi.de --- drivers/isdn/mISDN/socket.c | 2 +- include/linux/skbuff.h | 6 +++--- net/bluetooth/hci_sock.c| 4 ++-- net/compat.c| 8 net/ipv4/tcp.c | 2 +- net/rds

[Y2038] [PATCH v3 3/8] arch: sparc: Override struct __kernel_old_timeval

2019-01-07 Thread Deepa Dinamani
-by: Deepa Dinamani Cc: sparcli...@vger.kernel.org --- arch/sparc/include/uapi/asm/posix_types.h | 10 ++ include/uapi/linux/time.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/arch/sparc/include/uapi/asm/posix_types.h b/arch/sparc/include/uapi/asm/posix_types.h

[Y2038] [PATCH v3 1/8] arch: Use asm-generic/socket.h when possible

2019-01-07 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 Cc: ch...@zankel.net Cc: fenghua...@intel.com Cc: t...@linutronix.de Cc: schwidef

[Y2038] [PATCH v3 5/8] socket: Add struct __kernel_sock_timeval

2019-01-07 Thread Deepa Dinamani
of SO_TIMESTAMP_OLD. struct __kernel_sock_timeval will be used as the timestamp format at that time. struct __kernel_sock_timeval also maintains the same layout across 32 bit and 64 bit ABIs. Signed-off-by: Deepa Dinamani --- include/uapi/linux/time.h | 5 + 1 file changed, 5 insertions(+) diff --git

[Y2038] [PATCH v3 8/8] socket: Update timestamping Documentation

2019-01-07 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 v3 6/8] socket: Add SO_TIMESTAMP[NS]_NEW

2019-01-07 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 Cc

[Y2038] [PATCH v3 7/8] socket: Add SO_TIMESTAMPING_NEW

2019-01-07 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 3/3] sock: Add SO_RCVTIMEO_NEW and SO_SNDTIMEO_NEW

2019-01-07 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: linux-al

[Y2038] [PATCH 2/3] socket: Rename SO_RCVTIMEO/ SO_SNDTIMEO with _OLD suffixes

2019-01-07 Thread Deepa Dinamani
that the right option is enabled for userspace applications according to the architecture and time_t definition of libc. Signed-off-by: Deepa Dinamani Cc: ccaul...@redhat.com Cc: del...@gmx.de Cc: pau...@samba.org Cc: r...@linux-mips.org Cc: r...@twiddle.net Cc: cluster-de...@redhat.com Cc: linuxppc

[Y2038] [PATCH 0/3] net: y2038-safe socket timeout options

2019-01-07 Thread Deepa Dinamani
-deepa.ker...@gmail.com Deepa Dinamani (3): socket: Use old_timeval types for socket timeouts socket: Rename SO_RCVTIMEO/ SO_SNDTIMEO with _OLD suffixes sock: Add SO_RCVTIMEO_NEW and SO_SNDTIMEO_NEW arch/alpha/include/uapi/asm/socket.h | 13 - arch/mips/include/uapi/asm/socket.h| 13

[Y2038] [PATCH 1/3] socket: Use old_timeval types for socket timeouts

2019-01-07 Thread Deepa Dinamani
types are not supported anymore. Signed-off-by: Deepa Dinamani --- net/compat.c | 10 +- net/core/sock.c | 8 net/vmw_vsock/af_vsock.c | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/net/compat.c b/net/compat.c index b6ff0899e424

Re: [Y2038] [PATCH] input_event: Provide override for sparc64

2019-01-13 Thread Deepa Dinamani
> On Dec 29, 2018, at 10:35 AM, Deepa Dinamani wrote: > > The usec part of the timeval is defined as > __kernel_suseconds_ttv_usec; /* microseconds */ > > Arnd noticed that sparc64 is the only architecture > that defines __kernel_suseconds_t as int rather than l

Re: [Y2038] [PATCH v2 4/5] pselect6: use __kernel_timespec

2018-09-15 Thread Deepa Dinamani
On Sat, Sep 15, 2018 at 11:42 AM Thomas Gleixner wrote: > > On Sat, 15 Sep 2018, Deepa Dinamani wrote: > > > On Sat, Sep 15, 2018 at 8:28 AM Arnd Bergmann wrote: > > > > > > On Sat, Sep 15, 2018 at 7:09 AM Deepa Dinamani > > > wrote: &g

Re: [Y2038] [PATCH v2 4/5] pselect6: use __kernel_timespec

2018-09-15 Thread Deepa Dinamani
On Sat, Sep 15, 2018 at 8:28 AM Arnd Bergmann wrote: > > On Sat, Sep 15, 2018 at 7:09 AM Deepa Dinamani wrote: > > > +#if defined(CONFIG_64BIT_TIME) > > + > > +COMPAT_SYSCALL_DEFINE6(pselect6_time64, int, n, compat_ulong_t __user *, > > inp, > >

[Y2038] [PATCH v2 1/5] signal: Add set_user_sigmask()

2018-09-14 Thread Deepa Dinamani
urn value from the api as the function only returns an error on an invalid first argument that is hardcoded at these call sites. The updated logic uses set_current_blocked() instead. Signed-off-by: Deepa Dinamani --- fs/aio.c | 23 ++- fs/eventpoll.c |

[Y2038] [PATCH v2 0/5] y2038: Make ppoll, io_pgetevents and pselect y2038 safe

2018-09-14 Thread Deepa Dinamani
. 2. Provide y2038 safe versions of syscalls for all ABIs. [1] https://lkml.org/lkml/2018/8/27/651 Changes since v1: * fixed bug pointed out by arnd Deepa Dinamani (5): signal: Add set_user_sigmask() signal: Add restore_user_sigmask() ppoll: use __kernel_timespec pselect6: use

[Y2038] [PATCH v2 4/5] pselect6: use __kernel_timespec

2018-09-14 Thread Deepa Dinamani
) Native 32 bit : pselect6_time32 Compat : compat_sys_pselect6 Note that all other versions of select syscalls will not have y2038 safe versions. Signed-off-by: Deepa Dinamani --- fs/select.c | 98 ++-- include/linux/compat.h | 5 ++ include

[Y2038] [PATCH v2 5/5] io_pgetevents: use __kernel_timespec

2018-09-14 Thread Deepa Dinamani
for 32 bit ABIs) Native 32 bit : sys_io_pgetevents_time32 Compat : compat_sys_io_pgetevents Note that io_getevents syscalls do not have a y2038 safe solution. Signed-off-by: Deepa Dinamani --- fs/aio.c | 88 ++-- include/linux/compat.h | 6

[Y2038] [PATCH v2 3/5] ppoll: use __kernel_timespec

2018-09-14 Thread Deepa Dinamani
32 bit : ppoll_time32 Compat : compat_sys_ppoll Signed-off-by: Deepa Dinamani --- fs/select.c | 169 ++- include/linux/compat.h | 5 ++ include/linux/syscalls.h | 5 +- 3 files changed, 123 insertions(+), 56 deletions(-) diff --git a/fs

[Y2038] [PATCH v2 2/5] signal: Add restore_user_sigmask()

2018-09-14 Thread Deepa Dinamani
038 syscalls in the subsequent patches, we add 2 more new versions of the syscalls(for pselect, ppoll and io_pgetevents) in addition to the existing native and compat versions. Adding such an api reduces the logic that would need to be replicated otherwise. Signed-off-by: Deepa Dinamani --- fs/ai

Re: [Y2038] [PATCH 3/5] ppoll: use __kernel_timespec

2018-09-14 Thread Deepa Dinamani
On Fri, Sep 14, 2018 at 8:57 AM Arnd Bergmann wrote: > > On Sat, Sep 1, 2018 at 10:48 PM Deepa Dinamani wrote: > > > + > > + /* We can restart this syscall, usually */ > > + if (ret == -EINTR) { > > + restore_user_sigmask(si

Re: [Y2038] [PATCH v3 4/5] pselect6: use __kernel_timespec

2018-09-17 Thread Deepa Dinamani
On Mon, Sep 17, 2018 at 1:34 PM Stepan Golosunov wrote: > > On Sun, Sep 16, 2018 at 06:04:57PM -0700, Deepa Dinamani wrote: > > static long do_compat_pselect(int n, compat_ulong_t __user *inp, > > compat_ulong_t __user *outp, compat_ulong_t __user *exp, > > -

[Y2038] [PATCH v3 4/5] pselect6: use __kernel_timespec

2018-09-16 Thread Deepa Dinamani
) Native 32 bit : pselect6_time32 Compat : compat_sys_pselect6 Note that all other versions of select syscalls will not have y2038 safe versions. Signed-off-by: Deepa Dinamani --- fs/select.c | 94 ++-- include/linux/compat.h | 5 +++ include

[Y2038] [PATCH v3 5/5] io_pgetevents: use __kernel_timespec

2018-09-16 Thread Deepa Dinamani
for 32 bit ABIs) Native 32 bit : sys_io_pgetevents_time32 Compat : compat_sys_io_pgetevents Note that io_getevents syscalls do not have a y2038 safe solution. Signed-off-by: Deepa Dinamani --- fs/aio.c | 85 ++-- include/linux/compat.h | 6

[Y2038] [PATCH v3 2/5] signal: Add restore_user_sigmask()

2018-09-16 Thread Deepa Dinamani
038 syscalls in the subsequent patches, we add 2 more new versions of the syscalls(for pselect, ppoll and io_pgetevents) in addition to the existing native and compat versions. Adding such an api reduces the logic that would need to be replicated otherwise. Signed-off-by: Deepa Dinamani --- fs/ai

[Y2038] [PATCH v3 3/5] ppoll: use __kernel_timespec

2018-09-16 Thread Deepa Dinamani
32 bit : ppoll_time32 Compat : compat_sys_ppoll Signed-off-by: Deepa Dinamani --- fs/select.c | 166 ++- include/linux/compat.h | 5 ++ include/linux/syscalls.h | 5 +- 3 files changed, 120 insertions(+), 56 deletions(-) diff --git a/fs

[Y2038] [PATCH v3 0/5] y2038: Make ppoll, io_pgetevents and pselect y2038 safe

2018-09-16 Thread Deepa Dinamani
. 2. Provide y2038 safe versions of syscalls for all ABIs. [1] https://lkml.org/lkml/2018/8/27/651 Changes since v2: * remove 64BIT_TIME conditional for ppoll, pselect, io_getpevents as per review comments Changes since v1: * fixed bug pointed out by arnd Deepa Dinamani (5): signal: Add

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

2019-02-12 Thread Deepa Dinamani
On Sun, Feb 10, 2019 at 7:21 PM Deepa Dinamani wrote: > > On Feb 10, 2019, at 7:43 AM, Ran Rozenstein wrote: > > >> Subject: [PATCH net-next v5 09/12] socket: Add SO_TIMESTAMPING_NEW > >> > >> Add SO_TIMESTAMPING_NEW variant of socket timestamp options.

[Y2038] [PATCH net-next 1/2] time: Add time_types.h

2019-02-12 Thread Deepa Dinamani
: Add SO_TIMESTAMPING_NEW") Signed-off-by: Deepa Dinamani --- include/uapi/linux/time.h | 36 + include/uapi/linux/time_types.h | 40 + 2 files changed, 41 insertions(+), 35 deletions(-) create mode 100644 include/uapi/linux/ti

[Y2038] [PATCH net-next 0/2] uapi: Add a new header for time types

2019-02-12 Thread Deepa Dinamani
a dependency on these types. Note that there may be a trivial merge conflict with linux-next c70a772fda11 ("y2038: remove struct definition redirects"). Deepa Dinamani (2): time: Add time_types.h errqueue.h: Include time_types.h include/uapi/linux/errqueue.h | 1 + include/

[Y2038] [PATCH net-next 2/2] errqueue.h: Include time_types.h

2019-02-12 Thread Deepa Dinamani
Now that we have a separate header for struct __kernel_timespec, include it directly without relying on userspace to do it. Reported-by: Ran Rozenstein Signed-off-by: Deepa Dinamani --- include/uapi/linux/errqueue.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux

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

2019-02-10 Thread Deepa Dinamani
rchitectures. >> >> Signed-off-by: Deepa Dinamani >> Acked-by: Willem de Bruijn > > > Hi, > > I have app that include: >#include > > It now fail with this error: >In file included from timestamping.c:6:0: >/usr/include/linux/errqueue.h:46:

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

2019-02-08 Thread Deepa Dinamani
> You touched powerpc in the previous patch but not this one. > > That's because we use the asm-generic version I assume. That is correct. > Would be good to mention in the change log though to avoid any confusion. I'm not sure how to do that now. It looks like the series has already been

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

2019-02-01 Thread Deepa Dinamani
-by: Deepa Dinamani Cc: sparcli...@vger.kernel.org --- arch/sparc/include/uapi/asm/posix_types.h | 10 ++ include/uapi/linux/time.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/arch/sparc/include/uapi/asm/posix_types.h b/arch/sparc/include/uapi/asm/posix_types.h

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

2019-02-01 Thread Deepa Dinamani
safe types are not supported anymore. Signed-off-by: Deepa Dinamani Cc: i...@linux-pingi.de --- drivers/isdn/mISDN/socket.c | 2 +- include/linux/skbuff.h | 6 +++--- net/bluetooth/hci_sock.c| 4 ++-- net/compat.c| 6 +++--- net/ipv4/tcp.c | 2 +- net/rds/recv.c

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

2019-02-01 Thread Deepa Dinamani
of SO_TIMESTAMP_OLD. struct __kernel_sock_timeval will be used as the timestamp format at that time. struct __kernel_sock_timeval also maintains the same layout across 32 bit and 64 bit ABIs. Signed-off-by: Deepa Dinamani --- include/uapi/linux/time.h | 5 + 1 file changed, 5 insertions(+) diff --git

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

2019-02-01 Thread Deepa Dinamani
* Updated a few comments * Added documentation changes Arnd Bergmann (1): socket: move compat timeout handling into sock.c Deepa Dinamani (11): selftests: add missing include unistd arch: Use asm-generic/socket.h when possible sockopt: Rename SO_TIMESTAMP* to SO_TIMESTAMP*_OLD arch: sparc

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

2019-02-01 Thread Deepa Dinamani
to extend. 32-bit user space can now use old_timeval32 on both 32-bit and 64-bit machines, while 64-bit code can use __old_kernel_timeval. Signed-off-by: Arnd Bergmann Signed-off-by: Deepa Dinamani --- net/compat.c | 66 +--- net/core/sock.c

[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: fenghua

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

2019-02-01 Thread Deepa Dinamani
tag suffixes. Also note that kernel will not use the untagged SO_TIMESTAMP* and SCM_TIMESTAMP* options internally anymore. Signed-off-by: Deepa Dinamani Cc: del...@gmx.de Cc: dhowe...@redhat.com Cc: j...@parisc-linux.org Cc: r...@linux-mips.org Cc: r...@twiddle.net Cc: linux-...@lists.infradead.org

[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 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 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 Cc

[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: linux-al

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

2019-02-01 Thread Deepa Dinamani
is enabled for userspace applications according to the architecture and time_t definition of libc. Signed-off-by: Deepa Dinamani Cc: ccaul...@redhat.com Cc: del...@gmx.de Cc: pau...@samba.org Cc: r...@linux-mips.org Cc: r...@twiddle.net Cc: cluster-de...@redhat.com Cc: linuxppc

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 e

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

2019-02-02 Thread Deepa Dinamani
is enabled for userspace applications according to the architecture and time_t definition of libc. Signed-off-by: Deepa Dinamani Acked-by: Willem de Bruijn Cc: ccaul...@redhat.com Cc: del...@gmx.de Cc: pau...@samba.org Cc: r...@linux-mips.org Cc: r...@twiddle.net Cc: cluster-de...@redhat.com Cc

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

2019-02-02 Thread Deepa Dinamani
Add new socket timeout options that are y2038 safe. Signed-off-by: Deepa Dinamani Acked-by: Willem de Bruijn 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

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

2019-02-02 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 Acked-by: Willem de Bruijn Cc: ch...@zankel.net Cc: fenghua...@intel.com Cc: r...@twiddle.net Cc: t...@linutronix.de Cc

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

2019-02-02 Thread Deepa Dinamani
-by: Deepa Dinamani Acked-by: Willem de Bruijn Cc: sparcli...@vger.kernel.org --- arch/sparc/include/uapi/asm/posix_types.h | 10 ++ include/uapi/linux/time.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/arch/sparc/include/uapi/asm/posix_types.h b/arch/sparc

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

2019-02-02 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 Acked-by: Willem de Bruijn Cc

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

2019-02-02 Thread Deepa Dinamani
to extend. 32-bit user space can now use old_timeval32 on both 32-bit and 64-bit machines, while 64-bit code can use __old_kernel_timeval. Signed-off-by: Arnd Bergmann Signed-off-by: Deepa Dinamani Acked-by: Willem de Bruijn --- net/compat.c | 66

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

2019-02-02 Thread Deepa Dinamani
tag suffixes. Also note that kernel will not use the untagged SO_TIMESTAMP* and SCM_TIMESTAMP* options internally anymore. Signed-off-by: Deepa Dinamani Acked-by: Willem de Bruijn Cc: del...@gmx.de Cc: dhowe...@redhat.com Cc: j...@parisc-linux.org Cc: r...@linux-mips.org Cc: r...@twiddle.net Cc

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

2019-02-02 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 v5 07/12] socket: Add struct __kernel_sock_timeval

2019-02-02 Thread Deepa Dinamani
of SO_TIMESTAMP_OLD. struct __kernel_sock_timeval will be used as the timestamp format at that time. struct __kernel_sock_timeval also maintains the same layout across 32 bit and 64 bit ABIs. Signed-off-by: Deepa Dinamani Acked-by: Willem de Bruijn --- include/uapi/linux/time.h | 5 + 1 file changed, 5

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

2019-02-02 Thread Deepa Dinamani
safe types are not supported anymore. Signed-off-by: Deepa Dinamani Acked-by: Willem de Bruijn Cc: i...@linux-pingi.de --- drivers/isdn/mISDN/socket.c | 2 +- include/linux/skbuff.h | 6 +++--- net/bluetooth/hci_sock.c| 4 ++-- net/compat.c| 6 +++--- net/ipv4/tcp.c

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

2019-02-02 Thread Deepa Dinamani
to disentangle sock flags * Renamed sock_timeval to __kernel_sock_timeval * Updated a few comments * Added documentation changes Arnd Bergmann (1): socket: move compat timeout handling into sock.c Deepa Dinamani (11): selftests: add missing include unistd arch: Use asm-generic/socket.h when possible

[Y2038] [PATCH net-next v5 01/12] selftests: add missing include unistd

2019-02-02 Thread Deepa Dinamani
Compiling rxtimestamp.c generates error messages due to non-existing declaration for write() library call. Add missing unistd.h include to provide the declaration and silence the error. Signed-off-by: Deepa Dinamani Acked-by: Willem de Bruijn --- tools/testing/selftests/networking

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

2019-02-02 Thread Deepa Dinamani
On Sat, Feb 2, 2019 at 9:15 AM Oliver Hartkopp wrote: > > Hi all, > > On 02.02.19 16:34, Deepa Dinamani wrote: > > Add new socket timeout options that are y2038 safe. > (..) > > > > diff --git a/arch/alpha/include/uapi/asm/socket.h > > b/arch/al

Re: [Y2038] [PATCH 04/20] mount: Add mount warning for impending timestamp expiry

2019-08-12 Thread Deepa Dinamani
On Mon, Aug 12, 2019 at 7:11 AM Arnd Bergmann wrote: > > On Mon, Aug 12, 2019 at 3:25 PM Ben Hutchings > wrote: > > On Sat, 2019-08-10 at 13:44 -0700, Deepa Dinamani wrote: > > > On Mon, Aug 5, 2019 at 7:14 AM Ben Hutchings > > > wrote: > > > > On M

Re: [Y2038] [PATCH 04/20] mount: Add mount warning for impending timestamp expiry

2019-08-12 Thread Deepa Dinamani
On Mon, Aug 12, 2019 at 9:09 AM Deepa Dinamani wrote: > > On Mon, Aug 12, 2019 at 7:11 AM Arnd Bergmann wrote: > > > > On Mon, Aug 12, 2019 at 3:25 PM Ben Hutchings > > wrote: > > > On Sat, 2019-08-10 at 13:44 -0700, Deepa Dinamani wrote: > > > >

Re: [Y2038] [PATCH 05/20] utimes: Clamp the timestamps before update

2019-07-31 Thread Deepa Dinamani
On Wed, Jul 31, 2019 at 8:15 AM Darrick J. Wong wrote: > > On Mon, Jul 29, 2019 at 06:49:09PM -0700, Deepa Dinamani wrote: > > POSIX is ambiguous on the behavior of timestamps for > > futimens, utimensat and utimes. Whether to return an > > error or silently clamp a ti

[Y2038] [PATCH 03/20] timestamp_truncate: Replace users of timespec64_trunc

2019-07-29 Thread Deepa Dinamani
pression e; @@ inode->i_xtime = - timespec64_trunc( + timestamp_truncate( ..., - e); + inode); Signed-off-by: Deepa Dinamani Cc: adrian.hun...@intel.com Cc: an...@tuxera.com Cc: dedeki...@gmail.com Cc: gre...@linuxfoundation.org Cc: h...@lst.de Cc: hirof...@mail.parknet.co.jp Cc: jaeg...@kern

[Y2038] [PATCH 11/20] fs: cifs: Initialize filesystem timestamp ranges

2019-07-29 Thread Deepa Dinamani
/openspecs/windows_protocols/ms-cifs/d416ff7c-c536-406e-a951-4f04b2fd1d2b Signed-off-by: Deepa Dinamani Cc: sfre...@samba.org Cc: linux-c...@vger.kernel.org --- fs/cifs/cifsfs.c | 22 ++ fs/cifs/netmisc.c | 14 +++--- 2 files changed, 29 insertions(+), 7 deletions(-) diff

[Y2038] [PATCH 12/20] fs: fat: Initialize filesystem timestamp ranges

2019-07-29 Thread Deepa Dinamani
we support the full range of years that can be represented, up to 2107. Signed-off-by: Deepa Dinamani Cc: hirof...@mail.parknet.co.jp --- fs/fat/inode.c | 12 1 file changed, 12 insertions(+) diff --git a/fs/fat/inode.c b/fs/fat/inode.c index 05689198f5af..5f04c5c810fb 100644 --- a/fs/f

[Y2038] [PATCH 10/20] fs: nfs: Initialize filesystem timestamp ranges

2019-07-29 Thread Deepa Dinamani
struct nfstime3 { uint32 seconds; uint32 nseconds; }; Use the limits as per the RFC. Signed-off-by: Deepa Dinamani Cc: trond.mykleb...@hammerspace.com Cc: anna.schuma...@netapp.com Cc: linux-...@vger.kernel.org --- fs/nfs/super.c | 20 +++- 1 file

[Y2038] [PATCH 16/20] fs: orangefs: Initialize filesystem timestamp ranges

2019-07-29 Thread Deepa Dinamani
n/orangefs Author: Neill Miller Date: Thu Sep 2 15:00:38 2004 + Signed-off-by: Deepa Dinamani Cc: hub...@omnibond.com Cc: mar...@omnibond.com Cc: de...@lists.orangefs.org --- fs/orangefs/super.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/orangefs/super.c b/fs/orangefs/sup

[Y2038] [PATCH 15/20] fs: ceph: Initialize filesystem timestamp ranges

2019-07-29 Thread Deepa Dinamani
. Signed-off-by: Deepa Dinamani Cc: z...@redhat.com Cc: s...@redhat.com Cc: idryo...@gmail.com Cc: ceph-de...@vger.kernel.org --- fs/ceph/super.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/ceph/super.c b/fs/ceph/super.c index d57fa60dcd43..6cf3a4fceac1 100644 --- a/fs/ceph/super.c +++ b

[Y2038] [PATCH 13/20] fs: affs: Initialize filesystem timestamp ranges

2019-07-29 Thread Deepa Dinamani
Fill in the appropriate limits to avoid inconsistencies in the vfs cached inode times when timestamps are outside the permitted range. Also fix timestamp calculation to avoid overflow while converting from days to seconds. Signed-off-by: Deepa Dinamani Cc: dste...@suse.com --- fs/affs

[Y2038] [PATCH 14/20] fs: sysv: Initialize filesystem timestamp ranges

2019-07-29 Thread Deepa Dinamani
Fill in the appropriate limits to avoid inconsistencies in the vfs cached inode times when timestamps are outside the permitted range. Signed-off-by: Deepa Dinamani Cc: h...@infradead.org --- fs/sysv/super.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/sysv/super.c

[Y2038] [PATCH 20/20] isofs: Initialize filesystem timestamp ranges

2019-07-29 Thread Deepa Dinamani
Fill in the appropriate limits to avoid inconsistencies in the vfs cached inode times when timestamps are outside the permitted range. Reference: http://www.ecma-international.org/publications/standards/Ecma-119.htm Signed-off-by: Deepa Dinamani --- fs/isofs/inode.c | 7 +++ 1 file changed

[Y2038] [PATCH 18/20] fs: omfs: Initialize filesystem timestamp ranges

2019-07-29 Thread Deepa Dinamani
Fill in the appropriate limits to avoid inconsistencies in the vfs cached inode times when timestamps are outside the permitted range. Signed-off-by: Deepa Dinamani Cc: m...@bobcopeland.com Cc: linux-karma-de...@lists.sourceforge.net --- fs/omfs/inode.c | 4 1 file changed, 4 insertions

[Y2038] [PATCH 19/20] pstore: fs superblock limits

2019-07-29 Thread Deepa Dinamani
Also update the gran since pstore has microsecond granularity. Signed-off-by: Deepa Dinamani Cc: an...@enomsg.org Cc: ccr...@android.com Cc: keesc...@chromium.org Cc: tony.l...@intel.com --- fs/pstore/inode.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/pstore

[Y2038] [PATCH 17/20] fs: hpfs: Initialize filesystem timestamp ranges

2019-07-29 Thread Deepa Dinamani
Fill in the appropriate limits to avoid inconsistencies in the vfs cached inode times when timestamps are outside the permitted range. Also change the local_to_gmt() to use time64_t instead of time32_t. Signed-off-by: Deepa Dinamani Cc: miku...@artax.karlin.mff.cuni.cz --- fs/hpfs/hpfs_fn.h

[Y2038] [PATCH 02/20] vfs: Add timestamp_truncate() api

2019-07-29 Thread Deepa Dinamani
to accommodate filesystem timestamp clamping according to flesystem limits. Note that the tv_nsec part is set to 0 if tv_sec is not within the range supported for the filesystem. Signed-off-by: Deepa Dinamani --- fs/inode.c | 33 - include/linux/fs.h | 2 ++ 2

[Y2038] [PATCH 04/20] mount: Add mount warning for impending timestamp expiry

2019-07-29 Thread Deepa Dinamani
The warning reuses the uptime max of 30 years used by the setitimeofday(). Note that the warning is only added for new filesystem mounts through the mount syscall. Automounts do not have the same warning. Signed-off-by: Deepa Dinamani --- fs/namespace.c | 11 +++ 1 file changed, 11

[Y2038] [PATCH 01/20] vfs: Add file timestamp range support

2019-07-29 Thread Deepa Dinamani
to always support the min and max allowable values for the fields. Signed-off-by: Deepa Dinamani --- fs/super.c | 2 ++ include/linux/fs.h | 3 +++ include/linux/time64.h | 2 ++ 3 files changed, 7 insertions(+) diff --git a/fs/super.c b/fs/super.c index 2739f57515f8..e5835c38d336

[Y2038] [PATCH 06/20] fs: Fill in max and min timestamps in superblock

2019-07-29 Thread Deepa Dinamani
Fill in the appropriate limits to avoid inconsistencies in the vfs cached inode times when timestamps are outside the permitted range. Even though some filesystems are read-only, fill in the timestamps to reflect the on-disk representation. Signed-off-by: Deepa Dinamani Cc: aivazian.tig

[Y2038] [PATCH 08/20] adfs: Fill in max and min timestamps in sb

2019-07-29 Thread Deepa Dinamani
(). Signed-off-by: Deepa Dinamani --- fs/adfs/adfs.h | 13 + fs/adfs/inode.c | 8 ++-- fs/adfs/super.c | 2 ++ 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/fs/adfs/adfs.h b/fs/adfs/adfs.h index 804c6a77c5db..781b1c3817e0 100644 --- a/fs/adfs/adfs.h +++ b/fs/adfs

[Y2038] [PATCH 05/20] utimes: Clamp the timestamps before update

2019-07-29 Thread Deepa Dinamani
://pubs.opengroup.org/onlinepubs/009695399/functions/utimes.html Signed-off-by: Deepa Dinamani --- fs/utimes.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/fs/utimes.c b/fs/utimes.c index 350c9c16ace1..4c1a2ce90bbc 100644 --- a/fs/utimes.c +++ b/fs/utimes.c @@ -21,6

[Y2038] [PATCH 09/20] ext4: Initialize timestamps limits

2019-07-29 Thread Deepa Dinamani
0x28000..0x2 0x3 2310-04-04..2378-04-22 * 1 100x3..0x37fff 0x3 2378-04-22..2446-05-10 Note that the time limits are not correct for deletion times. Signed-off-by: Deepa Dinamani Reviewed-by: Andreas Dilger Cc: ty...@mit.edu Cc: adilger.ker

Re: [Y2038] [PATCH 19/20] pstore: fs superblock limits

2019-08-18 Thread Deepa Dinamani
On Fri, Aug 2, 2019 at 12:15 AM Arnd Bergmann wrote: > > On Fri, Aug 2, 2019 at 4:26 AM Deepa Dinamani wrote: > > > > On Tue, Jul 30, 2019 at 12:36 AM Arnd Bergmann wrote: > > > > > > On Tue, Jul 30, 2019 at 6:31 AM Kees Cook wrote: > > > >

[Y2038] [PATCH v8 11/20] fs: cifs: Initialize filesystem timestamp ranges

2019-08-18 Thread Deepa Dinamani
/openspecs/windows_protocols/ms-cifs/d416ff7c-c536-406e-a951-4f04b2fd1d2b Signed-off-by: Deepa Dinamani Cc: sfre...@samba.org Cc: linux-c...@vger.kernel.org --- fs/cifs/cifsfs.c | 22 ++ fs/cifs/netmisc.c | 14 +++--- 2 files changed, 29 insertions(+), 7 deletions(-) diff

[Y2038] [PATCH v8 13/20] fs: affs: Initialize filesystem timestamp ranges

2019-08-18 Thread Deepa Dinamani
Fill in the appropriate limits to avoid inconsistencies in the vfs cached inode times when timestamps are outside the permitted range. Also fix timestamp calculation to avoid overflow while converting from days to seconds. Signed-off-by: Deepa Dinamani Acked-by: David Sterba Cc: dste

<    1   2   3   4   5   6   7   >