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: Mon, 24 Jan 2022 10:26:16 -0300	[thread overview]
Message-ID: <699abc23-7e47-a85f-e553-b5a6c0b1f426@linaro.org> (raw)
In-Reply-To: <87y2352try.fsf@oldenburg.str.redhat.com>



On 24/01/2022 09:38, Florian Weimer wrote:
> * Adhemerval Zanella:
> 
>> On 24/01/2022 09:13, Florian Weimer wrote:
>>> * Adhemerval Zanella:
>>>
>>>>> typo: MSG_[C]TRUNC
>>>>>
>>>>> (I think this MSG_CTRUNC result is a remaining bug we need to fix
>>>>> separately for time32 mode.)
>>>>
>>>> Do you mean not returning the MSG_CTRUNC?
>>>
>>> No, if the caller uses CMSG_SPACE to allocate space for the expected
>>> ancillary data, we should not produce MSG_CTRUNC by stuffing in
>>> ancillary data that has not been requested.  Maybe we can do this for
>>> time32 code only.  Again it seems that userspace emulation is rather
>>> questionable here.
>>
>> But this would be only an issue for applications using _TIME_BITS=64
>> running on older kernels (so 32 bit timestamps would be visible to
>> the caller).  Since 64 bit is a opt-in feature, I think users will
>> see way more potential issues running _TIME_BITS=64 on older kernels.
> 
> As far as I can see, it is currently an issue for time32 applications
> running on old and new kernels.  We synthesize the time64 control
> messages unconditionally.

time32 applications running on any kernel will continue to see the 
timestamps because they will use the old SO_ constants and kernel will
synthesize them on the ancillary buffer.  

It might be a problem only when time32 application use the new 64 bit 
time_t SO_ constants either though a library built with _TIME_SIZE=64
or by using it directly (which should not be straightforward since both
kernel and glibc only define the 64 bit constants for _TIME_BITS=64).

  reply	other threads:[~2022-01-24 13:26 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 [this message]
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
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=699abc23-7e47-a85f-e553-b5a6c0b1f426@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).