> 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
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
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,
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
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
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
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
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/
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.
>
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:
> 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
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
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
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
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
: 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
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
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
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
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
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
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
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
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
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
> 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/
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
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:
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
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
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
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
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
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
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
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
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
: 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
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
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
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
-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
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
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
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
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
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
: 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
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
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
* 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
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
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
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
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
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
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 +++
> 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
")
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
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
> > >
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
> > 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);
>
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
> > 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
: 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
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
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
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
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
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
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
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
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
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
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
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
> 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
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
> > > + 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
> > + new_tstamp = sock_flag(sk, SOCK_TSTAMP_NEW);
> > + if (new_tstamp)
>
> nit: no need for explicit variable
Sure, will drop it.
-Deepa
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
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
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
, 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 |
: 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
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
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
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
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
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
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
> 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
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__
>> +
>
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
> 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
>> - 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,
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
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
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
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 - 100 of 130 matches
Mail list logo