From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3738F38576B4; Mon, 31 Oct 2022 17:29:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3738F38576B4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667237374; bh=1/iNzZPrqQ/cJl5b80JnIOel1WbjWnyVRVRpNiKYbJc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=TsMpp7HrG8JXLjtUE0r4brerBB+5TMJqmkvCyL/f04NU+1KCugETcOSddWbHUH+xL xCfLEiCRVUJwil3qDGNhHyZ6NLpHD5wEhUiJ35XLA2hlkg7lTxzuPgOcJxbQb6JSPj D9HCAMYRghVHVhzets329txX6WB/wqMMMkDKznoM= From: "adhemerval.zanella at linaro 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:29:33 +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: adhemerval.zanella at linaro 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 #21 from Adhemerval Zanella --- (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-bit = time > > that will trigger and invalid usage? > >=20 > > I am kind worried to change such code again, since it will require even= more > > validation that this does not subtle break anymore more. > >=20 > > [1] https://sourceware.org/pipermail/libc-alpha/2022-October/143089.html >=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 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 >=20 > 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 I don't have a strong opinion, this is essentially a refactor. Besides the type change on timeval, the rest should be ok (although not strickly relate= d to this issue). --=20 You are receiving this mail because: You are on the CC list for the bug.=