public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Florian Weimer <fweimer@redhat.com>
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 13:42:31 -0300	[thread overview]
Message-ID: <081bbb58-c202-503f-a9f0-0ba02864e93d@linaro.org> (raw)
In-Reply-To: <87lez0j6vv.fsf@oldenburg.str.redhat.com>



On 28/01/2022 11:02, Florian Weimer wrote:
> * 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.

Yeah, it does require to setup the alignment. I will change to use an union.

> 
> 
>> +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
> 

      reply	other threads:[~2022-01-28 16:42 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
2022-01-28 16:42     ` Adhemerval Zanella [this message]

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=081bbb58-c202-503f-a9f0-0ba02864e93d@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=carlos@redhat.com \
    --cc=fweimer@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).