public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
Cc: Paul Eggert <eggert@cs.ucla.edu>,  libc-alpha@sourceware.org
Subject: Re: [PATCH] login: Use unsigned 32-bit types for seconds-since-epoch
Date: Fri, 05 Apr 2024 14:52:13 +0200	[thread overview]
Message-ID: <87r0fk0y6a.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <7399c560-3565-4b8a-b3ae-360fe074941b@linaro.org> (Adhemerval Zanella Netto's message of "Fri, 5 Apr 2024 09:46:52 -0300")

* Adhemerval Zanella Netto:

> On 04/04/24 02:09, Florian Weimer wrote:
>> * Paul Eggert:
>> 
>>> On 4/3/24 11:39, Florian Weimer wrote:
>>>> For consistency,
>>>> if there is a 64-bit architecture that is coinstallable, define
>>>> __WORDSIZE_TIME64_COMPAT32 to 1 on the 32-bit architectyre as well.
>>>
>>> Could you explain the advantage of consistency here? User code almost
>>> invariably assignes ut_tv.tv_sec to time_t (this is true of every
>>> instance I found of ut_tv in Gnulib source code, for example). So
>>> changing this field's type on platforms where time_t is 32 bits will
>>> likely be ineffective in practice, and might cause more problems than
>>> it cures.
>> 
>> Few applications with a 32-bit time_t will work once there is a value in
>> this field with the MSB set.  So the relevant case is applications that
>> were built with -D_TIME_BITS=64, and there the consistent behavior with
>> the 64-bit architecture helps.
>
> This helps only architectures with __WORDSIZE_TIME64_COMPAT32, so it does
> not really solve the issue for all legacy platforms.

We can add more __WORDSIZE_TIME64_COMPAT32=1 definitions.

> I still prefer if we just deprecate this whole interface, since from
> other legacy ABI history (non-LFS interface) programs will keep using
> it until something breaks.

I don't disagree, I just want to give distributions the option to
backport a reviewed patch with a workaround that appears not to require
much application porting.  I believe many of us are preparing toolchains
for distributions that are running close to the 2038 cliff.

Thanks,
Florian


  reply	other threads:[~2024-04-05 12:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-03 18:39 Florian Weimer
2024-04-03 21:20 ` Paul Eggert
2024-04-04  5:09   ` Florian Weimer
2024-04-05 12:46     ` Adhemerval Zanella Netto
2024-04-05 12:52       ` Florian Weimer [this message]
2024-04-05 13:32         ` Adhemerval Zanella Netto
2024-04-08 12:19           ` Florian Weimer

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=87r0fk0y6a.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=eggert@cs.ucla.edu \
    --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).