From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 50A803858418; Tue, 1 Nov 2022 12:11:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 50A803858418 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667304702; bh=6KGls7523TwfSoCpUbP33PkXyJcKCt91AmWBhB+T9mY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=mC7Pn0BSppbq93sKUjekYVgolllNrIrN7ell6JdZ5gi0vtx/fHsDpfzQS3J3+14zO kBF0HnshOLc2w3rQIg2ZfY4IoLdtK8+DSx0hTO3H1Cl/W+WkpvoA7TuZZG0eTt7GzD 3H3p8ROD0A25MhChVgzEWKjMKyPjSkI2fyhkWCKU= From: "aurelien at aurel32 dot net" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.35 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: aurelien at aurel32 dot net X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29730 --- Comment #23 from Aurelien Jarno --- (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 > > >=20 > > > 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-bi= t time > > > that will trigger and invalid usage? > > >=20 > > > I am kind worried to change such code again, since it will require ev= en more > > > validation that this does not subtle break anymore more. > > >=20 > > > [1] https://sourceware.org/pipermail/libc-alpha/2022-October/143089.h= tml > >=20 > > Always Keep the function name sync with what it is doing. > >=20 > > We should use in_int32_t_range to determin the 32bit syscall or 64bit o= ne > > 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 > >=20 > > We should use in_time_t_range to detect overflow from the syscall retva= l: > > time/timegm.c > > time/mktime.c >=20 > For these above two your choice is correct, but it's not linked to syscall > retval. >=20 > > 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 >=20 > 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 discussi= on? --=20 You are receiving this mail because: You are on the CC list for the bug.=