From: Florian Weimer <fweimer@redhat.com>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Cc: libc-alpha@sourceware.org, Carlos O'Donell <carlos@redhat.com>
Subject: Re: [PATCH v5 3/3] Linux: Only generate 64 bit timestamps for 64 bit time_t recvmsg/recvmmsg
Date: Fri, 28 Jan 2022 15:02:12 +0100 [thread overview]
Message-ID: <87lez0j6vv.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <20220127201542.2306657-4-adhemerval.zanella@linaro.org> (Adhemerval Zanella's message of "Thu, 27 Jan 2022 17:15:42 -0300")
* Adhemerval Zanella:
> diff --git a/sysdeps/unix/sysv/linux/tst-socket-timestamp-compat.c b/sysdeps/unix/sysv/linux/tst-socket-timestamp-compat.c
> +/* Check if recvmsg create the additional 64 bit timestamp if only 32 bit
> + is enabled for 64 bit recvmsg symbol. */
> +static void
> +do_test_large_buffer (bool mc)
> +{
> + struct mmsghdr mmhdr = { 0 };
> + /* It should be large enought for either timeval/timespec and the
> + 64 time type as well. */
> + char msgbuf[512];
I think this needs a union with struct cmsgbuf to ensure alignment.
Alternatively, use malloc.
> +static void
> +do_test_small_buffer (bool mc)
> +{
> + struct mmsghdr mmhdr = { 0 };
> +
> + /* Enable 32 bit timeval precision and check if no 64 bit timeval stamp
> + is created. */
> + {
> + char msgbuf[CMSG_SPACE (sizeof (struct timeval))];
Likewise.
Rest looks okay. The kernel does not pass on whether a time32 or time64
system call was used, so implementing time32 recvmsg with recvmsg_time64
is fine in that regard.
Thanks,
Florian
next prev parent reply other threads:[~2022-01-28 14:02 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-27 20:15 [PATCH v5 0/3] Fix socket ancillary timestamp on 32 bit time_t ABIs Adhemerval Zanella
2022-01-27 20:15 ` [PATCH v5 1/3] support: Add support_socket_so_timestamp_time64 Adhemerval Zanella
2022-01-28 12:37 ` Florian Weimer
2022-01-27 20:15 ` [PATCH v5 2/3] linux: Fix ancillary 64-bit time timestamp conversion (BZ #28349, BZ#28350) Adhemerval Zanella
2022-01-28 13:22 ` Florian Weimer
2022-01-28 16:41 ` Adhemerval Zanella
2022-09-30 10:47 ` Szabolcs Nagy
2022-09-30 11:05 ` Szabolcs Nagy
2022-09-30 11:24 ` Adhemerval Zanella Netto
2022-09-30 12:31 ` Szabolcs Nagy
2022-09-30 12:51 ` Adhemerval Zanella Netto
2022-09-30 13:09 ` Arnd Bergmann
2022-09-30 13:46 ` Adhemerval Zanella Netto
2022-09-30 14:56 ` Arnd Bergmann
2022-09-30 15:33 ` Adhemerval Zanella Netto
2022-01-27 20:15 ` [PATCH v5 3/3] Linux: Only generate 64 bit timestamps for 64 bit time_t recvmsg/recvmmsg Adhemerval Zanella
2022-01-28 14:02 ` Florian Weimer [this message]
2022-01-28 16:42 ` 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=87lez0j6vv.fsf@oldenburg.str.redhat.com \
--to=fweimer@redhat.com \
--cc=adhemerval.zanella@linaro.org \
--cc=carlos@redhat.com \
--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).