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: Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org>
Subject: Re: [PATCH v4] linux: Fix ancillary 64-bit time timestamp conversion (BZ #28349, BZ #28350)
Date: Thu, 27 Jan 2022 09:19:27 -0300	[thread overview]
Message-ID: <16fe263b-fc7a-81ba-dd0e-0979f071a409@linaro.org> (raw)
In-Reply-To: <877dalo0ed.fsf@oldenburg.str.redhat.com>



On 27/01/2022 08:58, Florian Weimer wrote:
> * Adhemerval Zanella:
> 
>>> Are you sure?  I think our current recvmsg implementation cannot tell
>>> these two cases apart:
>>>
>>>   (a) time64 application running on an old kernel that does not have
>>>       time64 timestamping support (so time32 setsockopt was used by
>>>       glibc)
>>>
>>>   (b) time32 application running on any kernel that uses time32
>>>       setsockopt
>>>
>>> In both cases, we generate the time64 timestamp, and that can use to
>>> MSG_CTRUNC.  This is the systemd failure.
>>>
>>>   DHCP6 broken on armhf (and probably other 32 bit arches)
>>>   <https://github.com/systemd/systemd/issues/20564>
>>>
>>> We can fix this in a follow-up patch.
>>
>> The MSG_CTRUNC is suppose to be an warning to application would need a large
>> buffer for (a), it does not really make sense for (b).  I think we can
>> improve by adding a recvmsg64 that calls __convert_scm_timestamps and
>> remove the conversion on time32 call.
> 
> Right, I expected something like that, which is why I insisted on adding
> the time64 symbol aliases.

I can work on a patch for 2.35 if you think this is really required.  Another
options would just to remove the MSG_CTRUNC fro 2.35.

> 
>> It would still need a large buffer for (a), but I expect that time64
>> applications that expects to run on older kernels would need to handle
>> it.
> 
> Sounds reasonable to me.
> 
> Thanks,
> Florian
> 

  reply	other threads:[~2022-01-27 12:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-22 18:52 Adhemerval Zanella
2022-01-12 13:36 ` Adhemerval Zanella
2022-01-21 13:53 ` Florian Weimer
2022-01-24 12:07   ` Adhemerval Zanella
2022-01-24 12:13     ` Florian Weimer
2022-01-24 12:23       ` Adhemerval Zanella
2022-01-24 12:38         ` Florian Weimer
2022-01-24 13:26           ` Adhemerval Zanella
2022-01-26 20:48             ` Florian Weimer
2022-01-27 11:23               ` Adhemerval Zanella
2022-01-27 11:58                 ` Florian Weimer
2022-01-27 12:19                   ` Adhemerval Zanella [this message]
2022-01-27 13:32                     ` Florian Weimer
2022-01-27 13:55                       ` Adhemerval Zanella
2022-01-27 14:09                         ` Florian Weimer
2022-01-27 14:13                           ` Adhemerval Zanella
2022-01-27 14:17                             ` 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=16fe263b-fc7a-81ba-dd0e-0979f071a409@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --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).