From: Aurelien Jarno <aurelien@aurel32.net>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Cc: Stafford Horne <shorne@gmail.com>,
Alistair Francis <alistair.francis@wdc.com>,
GLIBC patches <libc-alpha@sourceware.org>
Subject: Re: [PATCH] time: Skip overflow itimer tests on 32-bit systems
Date: Fri, 28 Oct 2022 21:47:19 +0200 [thread overview]
Message-ID: <Y1wxx945EIPQoic+@aurel32.net> (raw)
In-Reply-To: <fa437cfa-3940-a846-f96f-61d5046813bc@linaro.org>
On 2021-07-06 16:58, Adhemerval Zanella via Libc-alpha wrote:
> > diff --git a/include/time.h b/include/time.h
> > index 4372bfbd96..377a4a45ea 100644
> > --- a/include/time.h
> > +++ b/include/time.h
> > @@ -342,6 +342,14 @@ in_time_t_range (__time64_t t)
> > return s == t;
> > }
> >
> > +/* Check whether T fits in a timeval32 (__int32_t). */
> > +static inline bool
> > +in_timeval32_range (__time64_t t)
> > +{
> > + __int32_t s = t;
> > + return s == t;
> > +}
> > +
>
> The name is confusing, it is mixing timeval from 'struct timeval' and
> time_t. And there is no need to use __int32_t, we need to use it only
> on installed headers to avoid namespace pollution.
>
> I fact I think it would be better to just change 'in_time_t_range' to
> use int32_t internally instead of time_t; I am pretty sure that all
> usages assume that sizeof(time_t) == 32.
Unfortunately this is not correct. MIPS N64 uses a 64-bit time_t,
however it does not define XSTAT_IS_XSTAT64. Therefore fstatat is
different than fstatat64, and uses the default
sysdeps/unix/sysv/linux/fstatat.c implementation, which uses
in_time_t_range() with a 64-bit time_t.
Therefore this change broke y2038 support in fstat/fstatat/lstat on MIPS
N64, which now returns EOVERFLOW for files which need such support. I
have opened BZ #29730.
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien@aurel32.net http://www.aurel32.net
next prev parent reply other threads:[~2022-10-28 19:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-07 13:18 Stafford Horne
2021-06-09 13:50 ` Adhemerval Zanella
2021-06-09 21:38 ` Stafford Horne
2021-06-12 9:19 ` Stafford Horne
2021-07-06 19:58 ` Adhemerval Zanella
2021-07-07 21:11 ` Stafford Horne
2022-10-28 19:47 ` Aurelien Jarno [this message]
2022-10-31 14:02 ` Adhemerval Zanella Netto
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=Y1wxx945EIPQoic+@aurel32.net \
--to=aurelien@aurel32.net \
--cc=adhemerval.zanella@linaro.org \
--cc=alistair.francis@wdc.com \
--cc=libc-alpha@sourceware.org \
--cc=shorne@gmail.com \
/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).