From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A92E93860766; Mon, 31 Oct 2022 17:14:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A92E93860766 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667236463; bh=lrDKyZ6v9IoBT8VSFeFn6DLMzvLMmnIONfO3OSCChUo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=bJQ6/4mL6Oaqo9SydsBNBxx9tWbst5ivZDiA5mY9JsUMbmq4VFTdv7drNPEinv5Nq s24F74DZz2OnjEYWKMYRXAxYx6JWGHyx9wkbpONwdZ7ebGn8WCfZE5MIBvkWH4GyD/ c4Y7mCK4K0YGIJ7RZph9J9QQ9+sAnfjR41LRAFIE= From: "syq at debian dot org" To: glibc-bugs@sourceware.org Subject: [Bug libc/29730] broken y2038 support in fstatat on MIPS N64 Date: Mon, 31 Oct 2022 17:14:22 +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: syq at debian dot org 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 #19 from YunQiang Su --- (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-bit ti= me > that will trigger and invalid usage? >=20 > I am kind worried to change such code again, since it will require even m= ore > validation that this does not subtle break anymore more. >=20 > [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 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 You are receiving this mail because: You are on the CC list for the bug.=