public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/7] Linux 64-bit time_t socket fixes
@ 2021-07-05 18:30 Adhemerval Zanella
  2021-07-05 18:30 ` [PATCH 1/7] linux: Consolidate Linux getsockopt implementation Adhemerval Zanella
                   ` (6 more replies)
  0 siblings, 7 replies; 25+ messages in thread
From: Adhemerval Zanella @ 2021-07-05 18:30 UTC (permalink / raw)
  To: libc-alpha

This series fixes some issues with socket timestamps on legacy ABIs 
with 32-bit time_t support.
  
The first two patches consolidates the setsockopt and getsockopt, which
fixes the missing timestamp handling on some architectures (hppa,
mips32, arm, cksy, and nios2).
     
The third and forth patches fixes a wrong conversion for timestamps
and a wrong argument usage for setsockopt.

Finally the remaining patches adds proper tests for both recvmsg
and recvmmsg.  They check for timestamp on both syscalls() with
different ancilliary data sizes (to check if convertion take this in
consideration, and with different time_t sizes.
 
I checked it on x86_64-linux-gnu and i686-linux-gnu on both 
5.11 kernel and on 4.15 kernel.  I am planning to run on some
different system with different kernels as well.
 
It might worth to check if this series fix the ruby issue [1].
 
[1] https://sourceware.org/pipermail/libc-alpha/2021-June/128113.html

Adhemerval Zanella (7):
  linux: Consolidate Linux getsockopt implementation
  linux: Consolidate Linux setsockopt implementation
  linux: Use the expected size for SO_TIMESTAMP{NS} convertion
  linux: Fix setsockopt fallback
  support: Add support_socket_time64_timestamp
  socket: Add recvmsg timestamp test
  socket: Add recvmmsg timestamp test

 support/Makefile                              |   1 +
 support/support.h                             |   3 +
 support/support_socket_time64_timestamp.c     |  68 +++++++
 sysdeps/unix/sysv/linux/Makefile              |   3 +
 sysdeps/unix/sysv/linux/alpha/syscalls.list   |   2 -
 sysdeps/unix/sysv/linux/arm/syscalls.list     |   2 -
 .../unix/sysv/linux/convert_scm_timestamps.c  |   8 +-
 sysdeps/unix/sysv/linux/generic/syscalls.list |   2 -
 sysdeps/unix/sysv/linux/hppa/syscalls.list    |   2 -
 .../unix/sysv/linux/i386/kernel-features.h    |   4 +-
 sysdeps/unix/sysv/linux/ia64/syscalls.list    |   2 -
 sysdeps/unix/sysv/linux/kernel-features.h     |   2 +
 .../unix/sysv/linux/m68k/kernel-features.h    |   4 +-
 .../sysv/linux/microblaze/kernel-features.h   |   2 -
 sysdeps/unix/sysv/linux/mips/syscalls.list    |   2 -
 .../unix/sysv/linux/powerpc/kernel-features.h |   2 -
 .../unix/sysv/linux/s390/kernel-features.h    |   4 +-
 sysdeps/unix/sysv/linux/setsockopt.c          |   2 +-
 sysdeps/unix/sysv/linux/sh/kernel-features.h  |   2 -
 .../unix/sysv/linux/sparc/kernel-features.h   |   4 +-
 sysdeps/unix/sysv/linux/tst-recvmmsg-time64.c |   1 +
 sysdeps/unix/sysv/linux/tst-recvmmsg.c        | 185 ++++++++++++++++++
 sysdeps/unix/sysv/linux/tst-recvmsg-time64.c  |   1 +
 sysdeps/unix/sysv/linux/tst-recvmsg.c         | 171 ++++++++++++++++
 sysdeps/unix/sysv/linux/x86_64/syscalls.list  |   2 -
 25 files changed, 450 insertions(+), 31 deletions(-)
 create mode 100644 support/support_socket_time64_timestamp.c
 create mode 100644 sysdeps/unix/sysv/linux/tst-recvmmsg-time64.c
 create mode 100644 sysdeps/unix/sysv/linux/tst-recvmmsg.c
 create mode 100644 sysdeps/unix/sysv/linux/tst-recvmsg-time64.c
 create mode 100644 sysdeps/unix/sysv/linux/tst-recvmsg.c

-- 
2.30.2


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2021-07-06 14:50 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-05 18:30 [PATCH 0/7] Linux 64-bit time_t socket fixes Adhemerval Zanella
2021-07-05 18:30 ` [PATCH 1/7] linux: Consolidate Linux getsockopt implementation Adhemerval Zanella
2021-07-05 18:58   ` Florian Weimer
2021-07-05 18:30 ` [PATCH 2/7] linux: Consolidate Linux setsockopt implementation Adhemerval Zanella
2021-07-05 18:59   ` Florian Weimer
2021-07-05 18:30 ` [PATCH 3/7] linux: Use the expected size for SO_TIMESTAMP{NS} convertion Adhemerval Zanella
2021-07-05 19:00   ` Florian Weimer
2021-07-06 13:06     ` Adhemerval Zanella
2021-07-05 18:30 ` [PATCH 4/7] linux: Fix setsockopt fallback Adhemerval Zanella
2021-07-05 19:07   ` Florian Weimer
2021-07-06 13:07     ` Adhemerval Zanella
2021-07-06 14:08       ` Florian Weimer
2021-07-05 18:30 ` [PATCH 5/7] support: Add support_socket_time64_timestamp Adhemerval Zanella
2021-07-05 18:46   ` Florian Weimer
2021-07-05 18:51     ` Adhemerval Zanella
2021-07-05 18:30 ` [PATCH 6/7] socket: Add recvmsg timestamp test Adhemerval Zanella
2021-07-05 19:32   ` Florian Weimer
2021-07-05 19:51     ` Adhemerval Zanella
2021-07-05 20:02       ` Florian Weimer
2021-07-05 20:35         ` Adhemerval Zanella
2021-07-06  9:29           ` Florian Weimer
2021-07-06 12:55             ` Adhemerval Zanella
2021-07-06 14:50               ` Florian Weimer
2021-07-05 18:30 ` [PATCH 7/7] socket: Add recvmmsg " Adhemerval Zanella
2021-07-05 19:12   ` Florian Weimer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).