Re: [PATCH net v2 1/2] socket: fix option SO_TIMESTAMPING_NEW

2020-10-12 Thread Deepa Dinamani
> On Mon, Oct 12, 2020 at 5:36 AM Christian Eggers wrote: > > v2: > > - > > - integrated proposal from Willem de Bruijn > > - added Reviewed-by: from Willem and Deepa You may add my Acked-by: Deepa Dinamani -Deepa

Re: [PATCH net 2/2] socket: don't clear SOCK_TSTAMP_NEW when SO_TIMESTAMPNS is disabled

2020-10-09 Thread Deepa Dinamani
O_TIMESTAMP(NS) and > SO_TIMESTAMPING that can be independently turned on and off, disabling > one can incorrectly switch modes while the other is still active. This will not help the case when a child process that inherits the fd and then sets SO_TIMESTAMP*_OLD/NEW on it, while the parent us

Re: [PATCH net 1/2] socket: fix option SO_TIMESTAMPING_NEW

2020-10-09 Thread Deepa Dinamani
On Fri, Oct 9, 2020 at 5:43 PM Willem de Bruijn wrote: > > On Fri, Oct 9, 2020 at 8:30 PM Deepa Dinamani wrote: > > > > On Fri, Oct 9, 2020 at 3:32 AM Christian Eggers wrote: > > > > > > The comparison of optname with SO_TIMESTAMPING_NEW is wrong way around,

Re: [PATCH net 1/2] socket: fix option SO_TIMESTAMPING_NEW

2020-10-09 Thread Deepa Dinamani
On Fri, Oct 9, 2020 at 3:32 AM Christian Eggers wrote: > > The comparison of optname with SO_TIMESTAMPING_NEW is wrong way around, > so SOCK_TSTAMP_NEW will first be set and than reset again. Additionally > move it out of the test for SOF_TIMESTAMPING_RX_SOFTWARE as this seems > unrelated. The SO

[PATCH net] selftests: fix timestamping Makefile

2019-02-13 Thread Deepa Dinamani
The clean target in the makefile conflicts with the generic kselftests lib.mk, and fails to properly remove the compiled test programs. Remove the redundant rule, the TEST_GEN_FILES will be already removed by the CLEAN macro in lib.mk. Signed-off-by: Deepa Dinamani --- * Changes since v1: as

[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

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

2019-02-12 Thread Deepa Dinamani
ocket: 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/lin

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

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

Re: [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. >

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

2019-02-10 Thread Deepa Dinamani
itectures. >> >> 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: [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 applie

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

[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

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

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

[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

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

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

[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

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

2019-02-02 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

[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

[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

[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

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

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

[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

[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

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

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

Re: [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/

[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

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

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

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

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

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

2019-02-01 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 --- tools/testing/selftests/networking/timestamping/rxtimestamp.c | 1 + 1

[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

[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

[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

[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

[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

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

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

[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

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

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

[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

Re: [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: [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 patches

[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

[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

[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

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

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

[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

[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

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

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

[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

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

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

[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

[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

[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

[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

[PATCH v3] sock: Make sock->sk_stamp thread-safe

2018-12-27 Thread Deepa Dinamani
a0c ("net: reorganize struct sock for better data locality") Note that all the instances of the sk_stamp accesses are either through the ioctl or the syscall recvmsg. Signed-off-by: Deepa Dinamani --- Changes since v2: * added ifdef as per eric's request Changes since v1: * fixed sunrpc s

Re: [PATCH] sock: Make sock->sk_tstamp thread-safe

2018-12-23 Thread Deepa Dinamani
On Sat, Dec 22, 2018 at 11:31 PM Eric Dumazet wrote: > > > > On 12/21/2018 12:27 PM, Deepa Dinamani wrote: > > Al Viro mentioned that there is probably a race condition > > lurking in accesses of sk_tstamp on 32-bit machines. > > > > sock->sk_tstamp is

[PATCH v2 1/1] sock: Make sock->sk_stamp thread-safe

2018-12-22 Thread Deepa Dinamani
a0c ("net: reorganize struct sock for better data locality") Note that all the instances of the sk_stamp accesses are either through the ioctl or the syscall recvmsg. Signed-off-by: Deepa Dinamani --- Changes since v1: * fixed sunrpc sk_stamp update include/net/sock.h | 16 +++

Re: [PATCH] sock: Make sock->sk_tstamp thread-safe

2018-12-22 Thread Deepa Dinamani
> Are we actually worried about concurrent writers here? I thought the > only problem was a race between writer and reader, which would mean > that we could solve it using only a seqcount_t which is cheaper to > update than a seqlock_t. I considered using just the seqcount_t. But, I think we do ca

[PATCH] sock: Make sock->sk_tstamp thread-safe

2018-12-21 Thread Deepa Dinamani
") Note that all the instances of the sk_tstamp accesses are either through the ioctl or the syscall recvmsg. Signed-off-by: Deepa Dinamani --- include/net/sock.h | 16 +--- net/compat.c | 30 +- net/core/sock.c| 34

Re: [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: [PATCH v2 7/8] socket: Add SO_TIMESTAMPING_NEW

2018-12-18 Thread Deepa Dinamani
On Tue, Dec 18, 2018 at 8:16 AM Arnd Bergmann wrote: > > On Wed, Dec 12, 2018 at 4:25 PM Willem de Bruijn > wrote: > > On Tue, Dec 11, 2018 at 3:30 PM Deepa Dinamani > > wrote: > > > > @@ -851,39 +890,7 @@ int sock_setsockopt(struct socket *so

Re: [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: [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 00e45c80e5

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

2018-12-14 Thread Deepa Dinamani
> > 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 > > +++ b/arch/alpha/include/uapi/asm/socket.h > > @@ -3,6 +3,7 @@ > > #define _UAPI_ASM_SOCKET_H > > > > #i

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

2018-12-11 Thread Deepa Dinamani
: 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

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

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

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

[PATCH v2 7/8] socket: Add SO_TIMESTAMPING_NEW

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

[PATCH v2 5/8] socket: Add struct __kernel_sock_timeval

2018-12-11 Thread Deepa Dinamani
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 a

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

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

[PATCH v2 8/8] socket: Update timestamping Documentation

2018-12-11 Thread Deepa Dinamani
With the new y2038 safe timestamping options added, update the documentation to reflect the changes. Signed-off-by: Deepa Dinamani --- Documentation/networking/timestamping.txt | 43 --- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/Documentation/networking

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

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

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

2018-12-11 Thread Deepa Dinamani
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 types for socket timestamps socket: Add struct __kernel_sock_timeval socket: Add

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

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

2018-11-30 Thread Deepa Dinamani
On Sat, Nov 24, 2018 at 7:59 PM Willem de Bruijn wrote: > > On Sat, Nov 24, 2018 at 3:58 AM Deepa Dinamani wrote: > > > > SO_TIMESTAMP, SO_TIMESTAMPNS and SO_TIMESTAMPING options, the > > way they are currently defined, are not y2038 safe. > > Subsequent patches in

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

2018-11-30 Thread Deepa Dinamani
On Sun, Nov 25, 2018 at 10:19 AM David Miller wrote: > > From: Willem de Bruijn > Date: Sun, 25 Nov 2018 09:18:55 -0500 > > > The existing logic is as is for a reason. There is no need to change > > it to satisfy the main purpose of your patchset? > > > > It is structured as one bit to test wheth

Re: [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 exa

Re: [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, > > > > fal

Re: [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 > > timesta

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

Re: [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: [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 socket opti

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

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

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

2018-11-23 Thread Deepa Dinamani
, the updates to rds_incoming->i_rx_tstamp only track SOCK_RCVTSTAMP and not SOCK_RCVTSTAMPNS. Signed-off-by: Deepa Dinamani --- include/net/sock.h | 4 +++- net/core/sock.c| 37 - net/ipv4/tcp.c | 20 +--- net/socket.c |

[PATCH 4/8] arch: sparc: Override struct __kernel_old_timeval

2018-11-23 Thread Deepa Dinamani
: 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

[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

[PATCH 6/8] socket: Add struct sock_timeval

2018-11-23 Thread Deepa Dinamani
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

[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

[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

[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

[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: [PATCH 16/31] nds32: VDSO support

2017-11-08 Thread Deepa Dinamani
> Do applications call into the vdso directly and expect to get a timespec > out? If they always go through the C library as an intermediate, then > the glibc clock_gettime() could do the conversion. It is recommended that applications do not call vdso symbols directly. According to manpage: "If

Re: [PATCH 16/31] nds32: VDSO support

2017-11-08 Thread Deepa Dinamani
On Wed, Nov 8, 2017 at 1:37 AM, Arnd Bergmann wrote: > On Wed, Nov 8, 2017 at 6:55 AM, Greentime Hu wrote: > >> --- /dev/null >> +++ b/arch/nds32/include/asm/vdso_datapage.h >> @@ -0,0 +1,51 @@ > >> +#ifndef __ASM_VDSO_DATAPAGE_H >> +#define __ASM_VDSO_DATAPAGE_H >> + >> +#ifdef __KERNEL__ >> + >

Re: [PATCH 04/12] fs: ceph: CURRENT_TIME with ktime_get_real_ts()

2017-06-01 Thread Deepa Dinamani
On Thu, Jun 1, 2017 at 5:36 PM, John Stultz wrote: > On Thu, Jun 1, 2017 at 5:26 PM, Yan, Zheng wrote: >> On Thu, Jun 1, 2017 at 6:22 PM, Arnd Bergmann wrote: >>> On Thu, Jun 1, 2017 at 11:56 AM, Yan, Zheng wrote: >>>> On Sat, Apr 8, 2017 at 8:57 AM, Deepa Dinaman

Re: [PATCH 06/12] audit: Use timespec64 to represent audit timestamps

2017-04-08 Thread Deepa Dinamani
> I have no problem merging this patch into audit/next for v4.12, would > you prefer me to do that so at least this patch is merged? This would be fine. But, I think whoever takes the last 2 deletion patches should also take them. I'm not sure how that part works out. > It would probably make lif

Re: [PATCH 02/12] trace: Make trace_hwlat timestamp y2038 safe

2017-04-07 Thread Deepa Dinamani
>> - trace_seq_printf(s, "#%-5u inner/outer(us): %4llu/%-5llu ts:%ld.%09ld", >> + trace_seq_printf(s, "#%-5u inner/outer(us): %4llu/%-5llu >> ts:%lld.%09ld", >>field->seqnum, >>field->duration, >>field->outer_duration,

[PATCH 05/12] fs: ufs: Use ktime_get_real_ts64() for birthtime

2017-04-07 Thread Deepa Dinamani
CURRENT_TIME is not y2038 safe. Replace it with ktime_get_real_ts64(). Inode time formats are already 64 bit long and accommodates time64_t. Signed-off-by: Deepa Dinamani --- fs/ufs/ialloc.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/ufs/ialloc.c b/fs/ufs

[PATCH 02/12] trace: Make trace_hwlat timestamp y2038 safe

2017-04-07 Thread Deepa Dinamani
struct timespec is not y2038 safe on 32 bit machines and needs to be replaced by struct timespec64 in order to represent times beyond year 2038 on such machines. Fix all the timestamp representation in struct trace_hwlat and all the corresponding implementations. Signed-off-by: Deepa Dinamani

[PATCH 10/12] apparmorfs: Replace CURRENT_TIME with current_time()

2017-04-07 Thread Deepa Dinamani
transitioned to y2038 safe behavior along with this change. CURRENT_TIME macro will be deleted before merging the aforementioned change. Signed-off-by: Deepa Dinamani --- security/apparmor/apparmorfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/apparmor/apparmorfs.c b

[PATCH 11/12] time: Delete CURRENT_TIME_SEC and CURRENT_TIME

2017-04-07 Thread Deepa Dinamani
All uses of CURRENT_TIME_SEC and CURRENT_TIME macros have been replaced by other time functions. These macros are also not y2038 safe. And, all their use cases can be fulfilled by y2038 safe ktime_get_* variants. Signed-off-by: Deepa Dinamani Acked-by: John Stultz Reviewed-by: Arnd Bergmann

  1   2   >