public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "aurelien at aurel32 dot net" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug libc/29730] broken y2038 support in fstatat on MIPS N64
Date: Tue, 01 Nov 2022 12:11:42 +0000	[thread overview]
Message-ID: <bug-29730-131-NXtkiExlvW@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-29730-131@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=29730

--- Comment #23 from Aurelien Jarno <aurelien at aurel32 dot net> ---
(In reply to Aurelien Jarno from comment #22)
> (In reply to YunQiang Su from comment #19)
> > (In reply to Adhemerval Zanella from comment #17)
> > > (In reply to YunQiang Su from comment #14)
> > > > Created attachment 14422 [details]
> > > > define in_int32_t_range
> > > 
> > > Besides the stat issue (which I just send a fix for it [1]), is there
> > > another case where in_time_t_range is being used by an ABI with 64-bit time
> > > that will trigger and invalid usage?
> > > 
> > > I am kind worried to change such code again, since it will require even more
> > > validation that this does not subtle break anymore more.
> > > 
> > > [1] https://sourceware.org/pipermail/libc-alpha/2022-October/143089.html
> > 
> > Always Keep the function name sync with what it is doing.
> > 
> > We should use in_int32_t_range to determin the 32bit syscall or 64bit one
> > to use, in the bellow files:
> >           sysdeps/unix/sysv/linux/clock_adjtime.c
> >           sysdeps/unix/sysv/linux/timer_settime.c:
> >           sysdeps/unix/sysv/linux/clock_nanosleep.c
> >           sysdeps/unix/sysv/linux/clock_settime.c
> >           sysdeps/unix/sysv/linux/pselect.c
> >           sysdeps/unix/sysv/linux/mq_timedreceive.c
> >           sysdeps/unix/sysv/linux/semtimedop.c
> >           sysdeps/unix/sysv/linux/mq_timedsend.c
> >           sysdeps/unix/sysv/linux/ppoll.c
> >           sysdeps/unix/sysv/linux/setitimer.c
> >           sysdeps/unix/sysv/linux/utimensat.c
> >           sysdeps/unix/sysv/linux/recvmmsg.c
> >           sysdeps/unix/sysv/linux/timerfd_settime.c
> >           sysdeps/unix/sysv/linux/setsockopt.c
> >           sysdeps/unix/sysv/linux/sigtimedwait.c
> >           sysdeps/unix/sysv/linux/select.c
> >           nptl/futex-internal.c
> > 
> > We should use in_time_t_range to detect overflow from the syscall retval:
> >           time/timegm.c
> >           time/mktime.c
> 
> For these above two your choice is correct, but it's not linked to syscall
> retval.
> 
> >           sysdeps/unix/sysv/linux/ftime.c
> >           sysdeps/unix/sysv/linux/sched_rr_gi.c
> >           sysdeps/unix/sysv/linux/stat_t64_cp.c
> >           sysdeps/unix/sysv/linux/time.c
> >           sysdeps/unix/sysv/linux/timespec_get.c
> >           sysdeps/unix/sysv/linux/gettimeofday.c
> >           sysdeps/unix/sysv/linux/clock_gettime.c
> >           sysdeps/unix/sysv/linux/fstatat.c
> 
> Additional comments:
> - No need to change int32_t into __int32_t in __timeval32
> - Renaming STAT_HAS_TIME32 into KERNEL_STAT64_HAS_TIME32 is correct, but is
> not needed to fix the issue. I think it might go into a separate patch

Maybe you can post an updated patch to the mailing list for easier discussion?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2022-11-01 12:11 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-28 19:39 [Bug libc/29730] New: " aurelien at aurel32 dot net
2022-10-29 16:56 ` [Bug libc/29730] " syq at debian dot org
2022-10-29 17:16 ` syq at debian dot org
2022-10-29 17:28 ` syq at debian dot org
2022-10-29 19:26 ` aurelien at aurel32 dot net
2022-10-29 19:45 ` syq at debian dot org
2022-10-30  4:14 ` syq at debian dot org
2022-10-30 14:30 ` adhemerval.zanella at linaro dot org
2022-10-30 16:55 ` syq at debian dot org
2022-10-30 18:07 ` aurelien at aurel32 dot net
2022-10-30 18:24 ` adhemerval.zanella at linaro dot org
2022-10-31  0:53 ` syq at debian dot org
2022-10-31  2:48 ` syq at debian dot org
2022-10-31  4:01 ` syq at debian dot org
2022-10-31  5:11 ` syq at debian dot org
2022-10-31 13:17 ` adhemerval.zanella at linaro dot org
2022-10-31 13:54 ` adhemerval.zanella at linaro dot org
2022-10-31 16:07 ` adhemerval.zanella at linaro dot org
2022-10-31 17:01 ` syq at debian dot org
2022-10-31 17:14 ` syq at debian dot org
2022-10-31 17:28 ` adhemerval.zanella at linaro dot org
2022-10-31 17:29 ` adhemerval.zanella at linaro dot org
2022-11-01 12:11 ` aurelien at aurel32 dot net
2022-11-01 12:11 ` aurelien at aurel32 dot net [this message]
2022-11-02 15:37 ` aurelien at aurel32 dot net
2022-11-02 15:39 ` cvs-commit at gcc dot gnu.org
2022-11-02 16:35 ` cvs-commit at gcc dot gnu.org
2022-11-02 18:12 ` cvs-commit at gcc dot gnu.org
2022-11-04  1:56 ` syq at debian dot org

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=bug-29730-131-NXtkiExlvW@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@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).