From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from hall.aurel32.net (hall.aurel32.net [IPv6:2001:bc8:30d7:100::1]) by sourceware.org (Postfix) with ESMTPS id A49EF3858C52 for ; Fri, 28 Oct 2022 19:47:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A49EF3858C52 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=aurel32.net Authentication-Results: sourceware.org; spf=none smtp.mailfrom=aurel32.net DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=aurel32.net ; s=202004.hall; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Content-Transfer-Encoding:From:Reply-To: Subject:Content-ID:Content-Description:X-Debbugs-Cc; bh=mMeGux6VmLGM1oYXvCLfZ0k9dlEMy8lAfEVfxkAwV78=; b=cNiXuEZyb8VVxYbzAB7ywoS5n0 vCt3rEXMdCsHy+wzBacZ8BScKKMn6uVbdF3r1k93g/S1ihoABvrEQxfGPH9dZYdvy7j4Ghd3JMw6d /iJ/yEcVn/iCeEPu1B/KjOU8SOUPuSJDns4M4HqNAp+j3GJlwMfXggFLxjxTIhchtqBbzhHHSK3kX C9FORkZ4QfKoGohd91/HSbh2wMO8r6R7FWR4urwykMpnLaAGPgUlVP3s52cHFS5G/nUyLjM9AjO4o 4v7lVc2tOrgjq8Ek8dhonlLwGv8njkKRBqBLY2KiG1FPeZvYjbjkEVzwWroiQsls5G1a9C3PP3/h0 QyDqX4mQ==; Received: from [2a01:e34:ec5d:a741:8a4c:7c4e:dc4c:1787] (helo=ohm.rr44.fr) by hall.aurel32.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ooVK3-00H4Nh-Vh; Fri, 28 Oct 2022 21:47:20 +0200 Received: from aurel32 by ohm.rr44.fr with local (Exim 4.96) (envelope-from ) id 1ooVK3-004XzY-1p; Fri, 28 Oct 2022 21:47:19 +0200 Date: Fri, 28 Oct 2022 21:47:19 +0200 From: Aurelien Jarno To: Adhemerval Zanella Cc: Stafford Horne , Alistair Francis , GLIBC patches Subject: Re: [PATCH] time: Skip overflow itimer tests on 32-bit systems Message-ID: Mail-Followup-To: Adhemerval Zanella , Stafford Horne , Alistair Francis , GLIBC patches References: <20210607131851.4015661-1-shorne@gmail.com> <8ad55354-5d41-eaa4-6d6c-e650ea30d7cc@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.2.7 (2022-08-07) X-Spam-Status: No, score=-13.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_PASS,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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