From: Florian Weimer <fw@deneb.enyo.de>
To: "Dr. Thomas Orgis" <thomas.orgis@uni-hamburg.de>
Cc: Alejandro Colomar <alx@kernel.org>, <linux-man@vger.kernel.org>
Subject: Re: mismatch of type of ut_tv.tv_sec between glibc-2.41 and utmp(5)
Date: Fri, 28 Feb 2025 13:18:22 +0100 [thread overview]
Message-ID: <87y0xqp8j5.fsf@mid.deneb.enyo.de> (raw)
In-Reply-To: <20250228103610.6c908004@plasteblaster> (Thomas Orgis's message of "Fri, 28 Feb 2025 10:36:10 +0100")
* Thomas Orgis:
> I don't know the history … did it use to be a signed integer and
> someone decided to buy some time by making it unsigned?
Yes, this changed in glibc 2.40. Some distributions may have
backported it.
commit 5361ad3910c257bc327567be76fde532ed238e42
Author: Florian Weimer <fweimer@redhat.com>
Date: Fri Apr 19 14:38:17 2024 +0200
login: Use unsigned 32-bit types for seconds-since-epoch
These fields store timestamps when the system was running. No Linux
systems existed before 1970, so these values are unused. Switching
to unsigned types allows continued use of the existing struct layouts
beyond the year 2038.
The intent is to give distributions more time to switch to improved
interfaces that also avoid locking/data corruption issues.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
> Now I have to think how elaborately I want to handle possible overflow
> from time_t assigning to uint32_t with the recommended way of using
> gettimeofday() for utmp …
On the other hand, utmp is pretty much obsolete because the design
assumes a fixed number of terminal lines.
next prev parent reply other threads:[~2025-02-28 12:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-28 9:36 mismatch of type of ut_tv.tv_sec between glibc-2.41 and utmp(5) Dr. Thomas Orgis
2025-02-28 12:18 ` Florian Weimer [this message]
2025-02-28 14:06 ` Alejandro Colomar
2025-03-03 9:31 ` Dr. Thomas Orgis
2025-03-03 9:47 ` Alejandro Colomar
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=87y0xqp8j5.fsf@mid.deneb.enyo.de \
--to=fw@deneb.enyo.de \
--cc=alx@kernel.org \
--cc=linux-man@vger.kernel.org \
--cc=thomas.orgis@uni-hamburg.de \
/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