From: Florian Weimer <fweimer@redhat.com>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH v6 3/3] Linux: Only generate 64 bit timestamps for 64 bit time_t recvmsg/recvmmsg
Date: Fri, 28 Jan 2022 19:19:01 +0100 [thread overview]
Message-ID: <875yq3k9ka.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <20220128175043.161446-4-adhemerval.zanella@linaro.org> (Adhemerval Zanella's message of "Fri, 28 Jan 2022 14:50:43 -0300")
* Adhemerval Zanella:
> The timestamps created by __convert_scm_timestamps only make sense for
> 64 bit time_t programs, 32 bit time_t programs will ignore 64 bit time_t
> timestamps since SO_TIMESTAMP will be defined to old values (either by
> glibc or kernel headers).
>
> Worse, if the buffer is not suffice MSG_CTRUNC is set to indicate it
> (which breaks some programs [1]).
>
> This patch makes only 64 bit time_t recvmsg and recvmmsg to call
> __convert_scm_timestamps. Also, the assumption to called it is changed
> from __ASSUME_TIME64_SYSCALLS to __TIMESIZE != 64 since the setsockopt
> might be called by libraries built without __TIME_BITS=64. The
> MSG_CTRUNC is only set for the 64 bit symbols, it should happen only
> if 64 bit time_t programs run older kernels.
>
> Checked on x86_64-linux-gnu and i686-linux-gnu.
>
> [1] https://github.com/systemd/systemd/pull/20567
> ---
> include/sys/socket.h | 10 +-
> sysdeps/unix/sysv/linux/Makefile | 10 +-
> sysdeps/unix/sysv/linux/recvmmsg.c | 45 ++-
> sysdeps/unix/sysv/linux/recvmsg.c | 34 ++-
> .../tst-socket-timestamp-compat-time64.c | 1 +
> .../sysv/linux/tst-socket-timestamp-compat.c | 265 ++++++++++++++++++
> 6 files changed, 336 insertions(+), 29 deletions(-)
> create mode 100644 sysdeps/unix/sysv/linux/tst-socket-timestamp-compat-time64.c
> create mode 100644 sysdeps/unix/sysv/linux/tst-socket-timestamp-compat.c
Looks okay.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
Thanks,
Florian
next prev parent reply other threads:[~2022-01-28 18:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-28 17:50 [PATCH v6 0/3] Fix socket ancillary timestamp on 32 bit time_t ABIs Adhemerval Zanella
2022-01-28 17:50 ` [PATCH v6 1/3] support: Add support_socket_so_timestamp_time64 Adhemerval Zanella
2022-01-28 17:50 ` [PATCH v6 2/3] linux: Fix ancillary 64-bit time timestamp conversion (BZ #28349, BZ#28350) Adhemerval Zanella
2022-01-28 17:50 ` [PATCH v6 3/3] Linux: Only generate 64 bit timestamps for 64 bit time_t recvmsg/recvmmsg Adhemerval Zanella
2022-01-28 18:19 ` Florian Weimer [this message]
2022-01-28 19:41 ` Carlos O'Donell
2022-01-29 4:51 ` H.J. Lu
2022-02-03 18:34 ` Szabolcs Nagy
2022-02-03 18:36 ` Adhemerval Zanella
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875yq3k9ka.fsf@oldenburg.str.redhat.com \
--to=fweimer@redhat.com \
--cc=adhemerval.zanella@linaro.org \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).