Received: by 2002:ab2:7a09:0:b0:1f8:46dc:890e with SMTP id k9csp52643lqo; Wed, 15 May 2024 07:32:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUwkOsmM+Et7baNeq244ZzQKB1Vzml6r0LDxrwUehFSGHwTjcJmSFHEcireUQI3TkhGQym20HUS+rTR2002XUe3OKOnLjPoYzCIRoNHsw== X-Google-Smtp-Source: AGHT+IHXXJ/bXn3o/UP6nkFEtEaawq3sxxl8yZUeuYn6ADNu834y9mwOR9PGUVnQpX/clJECyuPc X-Received: by 2002:a05:6358:7696:b0:183:ea4b:620 with SMTP id e5c5f4694b2df-193bd0078c0mr1858860655d.28.1715783534823; Wed, 15 May 2024 07:32:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715783534; cv=pass; d=google.com; s=arc-20160816; b=jNdn7rCte67siJNcEK2VYCyK1epngDDQ2Ymyxlnxy1Yu/YP4CV4kRXml56QvOPKxWr KAD0CDHc6eg3QrjOeDqPhbVIKjPMYy01gPYKzY1d6w5ncxR6O9dgCVLTAeLaf6iHMuvN JXEEoBJnCyCZ6JzJnEgLgSqff+VECL3JZKeg8IZ19Eaz5Z/ipsExZQOMWw4Qhs6iVwfK EmdfbBtzsDxFM+iozjuKCelbqDxgQO3FBfW8kOLRw5bvzwhk0eXm+CDm82RabgGC4Vrz 1pE73SVjkMaZI+uJOPjDymk09BvcivNcHBDxGoeFpJwTnnH5V42m+1icwHxr9TGCSgGF OW0g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:subject:cc:to:from:date:references :in-reply-to:message-id:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:user-agent:feedback-id:dkim-signature :dkim-signature; bh=VYHmieqUmmpUUBGaoj5sdegT+mtMw56IFZEbX0OZWos=; fh=0Bkumu/r0bAPi1AHZILDWMdrL5Y0zapLPSJ9//0uth0=; b=Z6k80urF5b7wm1aqv9Kp0NVEdz1ho+yYKi2GyU/KVRLw6NZP7vQhuzquAaErdNlIF1 ai915stLwPCI9nBsdG24MubzOAMgrV2MXMNsuqDQx3Q79n+cV8q9CTwSiyF/vwmPg5Ez hnrRTrFcl8rzK/qCYPvJM8D8LKX45oG2X6nnUEaDTvn5cf1ZILzRb0kb9QEiiBZSlC+H sGQPHX/H/v7HtjokqXv/B7M8aaa2EiVgCnUzkmdMsSu7qDYkvhYqa/GwRmL3RD7xXHHS aOCkJvOyFCVm6TSmwDSv7uYaV879iBgSsaGwMHSdWnAhtksYUTjfq7pjIyuLw122zDS9 W3AQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=qUW0E3IH; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=JbiCqNfi; arc=pass (i=1 spf=pass spfdomain=arndb.de dkim=pass dkdomain=arndb.de dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=arndb.de); spf=pass (google.com: domain of linux-kernel+bounces-179993-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179993-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-6340b3951ebsi13290485a12.238.2024.05.15.07.32.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 07:32:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-179993-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=qUW0E3IH; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=JbiCqNfi; arc=pass (i=1 spf=pass spfdomain=arndb.de dkim=pass dkdomain=arndb.de dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=arndb.de); spf=pass (google.com: domain of linux-kernel+bounces-179993-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179993-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 984EAB2177C for ; Wed, 15 May 2024 14:26:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 02B9F13FD6E; Wed, 15 May 2024 14:26:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="qUW0E3IH"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="JbiCqNfi" Received: from wfout4-smtp.messagingengine.com (wfout4-smtp.messagingengine.com [64.147.123.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5530313F450; Wed, 15 May 2024 14:25:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.147 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715783160; cv=none; b=TmB9IxIC0GQCLVWB8lMUprWmFQUM1x7r4pBmmjSCPY+hz8S2PcbMqG3Z/u9dO2f0GJUC1opOJGe/x4Nqg3j57/Fg3WJgtm8dA6Alt7c8C5X+PCb+wCfbHogX/4v0TEv55UxhEzPdTWfY/La+MQ0Q29qR6QkZ1BmPUWF6rypFUJ4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715783160; c=relaxed/simple; bh=v0x+DpEEQ/CULK66tGCdFakqHf6CBwbzeJc6dtqG+8g=; h=MIME-Version:Message-Id:In-Reply-To:References:Date:From:To:Cc: Subject:Content-Type; b=QnMUR+EaR3BH+RtPT2xS0Gaxb5BS54Rn3LnH+HjO5OPhEwDyDHum0RUPGDD7TBzFri1XYI2qoZKYs5gdKjamOi2vlSFsyojTw2qUjx0mhK8ipMYKBz6Dx3rcLZluMkOWJRNn+EketzZdrlGqVh8MTnb7W5BEFQhzuawx+L43xns= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de; spf=pass smtp.mailfrom=arndb.de; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b=qUW0E3IH; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=JbiCqNfi; arc=none smtp.client-ip=64.147.123.147 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfout.west.internal (Postfix) with ESMTP id BD2AF1C0011F; Wed, 15 May 2024 10:25:56 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Wed, 15 May 2024 10:25:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1715783156; x=1715869556; bh=VYHmieqUmmpUUBGaoj5sdegT+mtMw56IFZEbX0OZWos=; b= qUW0E3IHNV0pMPfRqgt3mn0hnA8AU1orLPsgNR0eNOGBxcuNTg3SL/qTJRCCP6kP Xui8DnRR4yqxxl3JMLgAvGSiWr0XrOolLOQyp86RNtqeEb9fw5wu0y+nDO1OsTVi 2T7DqYFoxMQa2FCkCyJ/1yRHcRCPGTR8eSeFUb9jVU2aIcFl0zaaUbNfINpOcC4Q 59M8mVWNVfZLFsb/QXGUevN391ZYCw/b+voZqxwrn0tZlfI/uLHdtn6sLk52fZgS nECiNlthidEQb4PpjMg0QEp50ubzSOXXLTUbfkvto3CAY82cWNuQVCQLjHi/qDcL ncIiJVj/+E/IJRUKXRQilw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1715783156; x= 1715869556; bh=VYHmieqUmmpUUBGaoj5sdegT+mtMw56IFZEbX0OZWos=; b=J biCqNfiVIax+RcCdhhNfmby2OPYHVF7LWKY7r6n8K/T+KRi7Uh52540l96Ad+XiO ERixAx5aV4eQ7LI0sLf7BDSyvDo86KCXkaCw3DH5wzobEo5eq50pDoLYBFnhOWat e9S0D5m3ZiBtSDvE2D0+YSL/3uoiJa5jQpIREvianAscw3E1P/d8m6vskqoeYuWM 2pkcqursle3l1LSA1uP3e9X5miby8ZHOG/6aN3NKP7TOUO/wWkmT12itJsHYiAC3 iDtzW2VBOE93gSQIm8EZatH2OoZiGriTMfiGB4iT7PkaZlqq9ca+rD62Au3n+ClU e3EYrozltGACD81fU3zDQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdegkedgjeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtgfesthhqredtreerjeenucfhrhhomhepfdet rhhnugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrg htthgvrhhnpeegfeejhedvledvffeijeeijeeivddvhfeliedvleevheejleetgedukedt gfejveenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grrhhnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 23041B6008D; Wed, 15 May 2024 10:25:55 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-455-g0aad06e44-fm-20240509.001-g0aad06e4 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: In-Reply-To: <3937d6b1-119b-195e-8b9b-314a0bfbeaeb@loongson.cn> References: <20240511100157.2334539-1-chenhuacai@loongson.cn> <3937d6b1-119b-195e-8b9b-314a0bfbeaeb@loongson.cn> Date: Wed, 15 May 2024 14:25:28 +0000 From: "Arnd Bergmann" To: "Bibo Mao" , "Huacai Chen" , "Huacai Chen" Cc: loongarch@lists.linux.dev, Linux-Arch , "Xuefeng Li" , guoren , "WANG Xuerui" , "Jiaxun Yang" , linux-kernel@vger.kernel.org, loongson-kernel@lists.loongnix.cn, stable@vger.kernel.org Subject: Re: [PATCH] LoongArch: Define __ARCH_WANT_NEW_STAT in unistd.h Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable On Wed, May 15, 2024, at 09:30, maobibo wrote: > On 2024/5/11 =E4=B8=8B=E5=8D=888:17, Arnd Bergmann wrote: >> On Sat, May 11, 2024, at 12:01, Huacai Chen wrote: >>=20 >> Importantly, we can't just add fstatat64() on riscv32 because >> there is no time64 version for it other than statx(), and I don't >> want the architectures to diverge more than necessary. > yes, I agree. Normally there is newfstatat() on 64-bit architectures b= ut=20 > fstatat64() on 32-bit ones. > > I do not understand why fstatat64() can be added for riscv32 still. > 32bit timestamp seems works well for the present, it is valid until > (0x1UL << 32) / 365 / 24 / 3600 + 1970 =3D=3D 2106 year. Year 2106 sho= uld > be enough for 32bit system. There is a very small number of interfaces for which we ended up not using a 64-bit time_t replacement, but those are only for relative times, not epoch based offsets. The main problems here are: - time_t is defined to be a signed value in posix, and we need to handle file timestamps before 1970 in stat(), so changing this one to be unsigned is not an option. - A lot of products have already shipped that will have to be supported past 2038 on existing 32-bit hardware. We cannot regress on architectures that have already been fixed to support this.=20 - file timestamps can also be set into the future, so applications relying on this are broken before 2038. Arnd