From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 143CC1F910 for ; Tue, 8 Nov 2022 11:22:07 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=arndb.de header.i=@arndb.de header.b="Buz0bBYT"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="A8S5SOi6"; dkim-atps=neutral Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 56C59385828B for ; Tue, 8 Nov 2022 11:22:06 +0000 (GMT) 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-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" 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