From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by sourceware.org (Postfix) with ESMTPS id D03EC3858D35 for ; Tue, 8 Nov 2022 11:21:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D03EC3858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=arndb.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arndb.de Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id A2EA85C0126; Tue, 8 Nov 2022 06:21:52 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute3.internal (MEProxy); Tue, 08 Nov 2022 06:21:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; t=1667906512; x=1667992912; bh=aaEfE24Yi6 v5j1I0IzNuAjmf0MZ8kJ8a7h7haSy2GKo=; b=Buz0bBYTFRcKuUxhL4UxdEZXOr itpqiMNCZ0i44EbdYJUN5Owomc4QKHvWvDA+4nWmm8KRfOmzWNtHZjkz/fKlnTIl 0TCwtbfNqXaYfFNjPcCdZ09kmJrQXIvaawdCWXuaMKblQf0u/k2kXhcicmT+lsE4 50rbq49oUqX6GqO90vFPlAIJE7vlnxYcsKC3NcoFRlyW0A41Q4AeTUWLLBTf1gYN KIPLxh9oF5kX3ugpL1irTcLHiXYfJgJCwjhbm4hlBsXtJxClOd+8yXEqaHvqSMkb zQnq6S6yV1F4j0xnN4FmX7DPrL2ziDA8EsIYRS3AF0emcu2LPQo018TfPTFw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1667906512; x=1667992912; bh=aaEfE24Yi6v5j1I0IzNuAjmf0MZ8 kJ8a7h7haSy2GKo=; b=A8S5SOi6nV7kiTpS8OeIKZNvVMNsxQMGZMM84QMAK1y0 PY+hN244/qwCMWMHbc+yV8IbGnJ6ihkFyXztJzcDSO8TY6Fj2WtjU6b0JrrbYghG ai0/Z4uu6jjcBIbl/+/nhffiKFl2FO8cPwRxRLVF2SasSmZKl8JfQDQos8ya2L3o bS45dj+NMs6XUk3bvl/QDilI6SyNWGEhB9+bKK3HiLxay/nEiaKuu21hQ0rAo9lR EBBwVDp1x8tWsseIcXiyWNv1P+X5HgLYtSdknx/hULbSFMXqbP8v0huls3DcZhXQ DX71r+T8Pla+ycPmibnvkjDzDnqNcgA8uQKSW3FQlw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrfedtgddvkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgesthdtredtreertdenucfhrhhomhepfdetrhhn ugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrghtth gvrhhnpeffheeugeetiefhgeethfejgfdtuefggeejleehjeeutefhfeeggefhkedtkeet ffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrrh hnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 27FA6B60086; Tue, 8 Nov 2022 06:21:52 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-1115-g8b801eadce-fm-20221102.001-g8b801ead Mime-Version: 1.0 Message-Id: <5ae33887-9a56-482f-b8b3-c223ad2959ee@app.fastmail.com> In-Reply-To: <8c9f4e1a-b77b-2257-7558-41b27dbe7344@linaro.org> References: <20221104015428.1545677-1-yunqiang.su@cipunited.com> <50e745fa-0508-43f1-bd0a-cfa789239f7e@app.fastmail.com> <6100f772-fab4-4e92-a6a9-cf882954df9d@app.fastmail.com> <8c9f4e1a-b77b-2257-7558-41b27dbe7344@linaro.org> Date: Tue, 08 Nov 2022 12:21:31 +0100 From: "Arnd Bergmann" To: "Adhemerval Zanella Netto" , "YunQiang Su" , "Xi Ruoyao" Cc: syq@debian.org, aurelien@aurel32.net, "Jiaxun Yang" , "Maciej W. Rozycki" Subject: Re: [PATCH] Rename STAT_HAS_TIME32 to KERNEL_STAT64_HAS_TIME32 Content-Type: text/plain X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,JMQ_SPF_NEUTRAL,KAM_NUMSUBJECT,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no 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 Mon, Nov 7, 2022, at 19:45, Adhemerval Zanella Netto wrote: > On 07/11/22 15:24, Arnd Bergmann wrote: >> What is the glibc behavior for i386 with 64-bit time_t on a >> kernel without statx? Does that also intepret a time value >> of -1u as a 2106 timestamp, or does it convert that into a >> 1969 timestamp like the other (not mips/pa-risc) 64-bit >> architectures do? > > The time_t for glibc is always signed and for legacy 32-bit ABIs > it issues fstatat64 and assumes that kernel will handle potential > overflow by returning a proper error (if syscall succeeds then the > file times are within the signed 32 bit time_t range). > > My understanding is mips is the only outlier here with unsigned > kernel stat times, which on glibc is handled with a special function > that just that interprets the values as 2106 timestamp > (__cp_kstat_stat64_t64). Ok, got it. In this case I guess we should probably follow the same behavior in the kernel when we add the truncation and use the 1902..2038 range for all 32-bit targets but use the 1970..2106 range for mips64. Not sure what to do about mips32 compat mode though. At the moment, the o32/n32 stat64 is shared with the n64 stat ("newstat") variant, but if n64 actually wants a different behavior, we may need to add custom handlers for that. Arnd