Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp1274604lqs; Sat, 15 Jun 2024 01:55:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX8y9KsJ+4/u4gcdMlp/cDrXas1fTRLdlzkZeTWLdV8b2OV77sE/UCvz4TD8/nAWTxS810Oyvid25YKAFbjZh9dvd71HkV4wFTWjYBwJQ== X-Google-Smtp-Source: AGHT+IGgjADqK1Q6kVG+IGtNEZ/o6j1IvHJHmYIbTP5xVgo9rTYzOzEATkmKYMHA1WF9tfsMzQ87 X-Received: by 2002:a05:622a:4405:b0:442:192c:c062 with SMTP id d75a77b69052e-442192cc35amr29056681cf.44.1718441724129; Sat, 15 Jun 2024 01:55:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718441724; cv=pass; d=google.com; s=arc-20160816; b=CqRrSxEvZi7Cr9M2iehhd/qDTk6tTiS9esmgxVKvDHUNs4TGvOagPY1o0Pq8vFFLsD XLPiEcE83InZK4+oUpPTwLspl1Ocz2fMBsWMcxA91NQ0diU4ygmb5wPfCNn5F1wxdtih wIXNrrZ5rwZRBb+tQcCENvIxJxEqoIV5vJaxP8xElgln/0YXSmRqQOpDZzWCXjG1a55y TiDg89ZzyijnVk2sN1s9pTXz+TlLrZ1M96Pacfbnbp+ExZP+rIx6rAfRJzadVCz/Kxhd Wc/78CCFoHNCS0jTGLp3pEXPxtSJGrhJz39gKhtMOq1BzMJdoGg9YzuUb6y0WMN4f/K8 IYWw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=Z928AedcpwfuY8CPITIjqrG8YiwkgLLmfbNTlFLN0AM=; fh=MlR5xAGfOX0mugf7SVbXtFgD9FLsYqMOpDR8UaJpero=; b=ukL0sk2NXVqUjcM6fCx28ud0wxfFbLWwsSWB0i9AxNeOggZIbQE2AEw8Qut+eflApe Z42IkgY7lEDwzDKZQIUJlFnys75ls5XjujZGAqMJRnv7/mIdMf49vcVAo6FxrDrFPWZj zow0uAl1/piX5QP5cIzJ59CkZsY3CAzoZ3z9EUC49i8mDoKqH+0nccuo1/h9wJnIQiII rH6JYO/QvttGtD8ncEWUEgNOWcbnDBVuuqI+D/vzQkXeWr98XQ8F+y6e6lEBo1cvLBzQ wgz7sV2RGj6CzKJBfaznmDUofkvS9xtIXZo3rnX0s1Shba/tKw/RYWBxG2T7h88+80Xl VyWw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b=C7IePpto; arc=pass (i=1 spf=pass spfdomain=xry111.site dkim=pass dkdomain=xry111.site dmarc=pass fromdomain=xry111.site); spf=pass (google.com: domain of linux-kernel+bounces-215800-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215800-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=xry111.site Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-441ef3d9745si52393891cf.184.2024.06.15.01.55.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Jun 2024 01:55:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-215800-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b=C7IePpto; arc=pass (i=1 spf=pass spfdomain=xry111.site dkim=pass dkdomain=xry111.site dmarc=pass fromdomain=xry111.site); spf=pass (google.com: domain of linux-kernel+bounces-215800-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215800-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=xry111.site 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id D15281C21E89 for ; Sat, 15 Jun 2024 08:55:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 60A1320326; Sat, 15 Jun 2024 08:55:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=xry111.site header.i=@xry111.site header.b="C7IePpto" Received: from xry111.site (xry111.site [89.208.246.23]) (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 554C0179A8; Sat, 15 Jun 2024 08:55:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=89.208.246.23 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718441714; cv=none; b=heSlwYpdcqtkt+ypn3AedU1lad2n+MRvIBVdxUrOa9+3UYopEEiWKfVETzDvAEZFe6XC9RqFGbEi4TyH1jX5Isl2aN28H5StA9Dv09O+STPQEr1lf+WSg2TJLuw6cnzy7T0lmqVaauYfRX1JXLNmH10SNCQKgHN+0+8Wx9JF3cA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718441714; c=relaxed/simple; bh=gjwUXfnpJrMIPFPi48+TIaXScjHDYpomx5mQ/+7wIGg=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=rjn6mwfFkddB2pFXv5wGSCIC8jKsHcn2kLY6ixEXp5QOCzV4GWmfjxL2wsZu57AavLJS09FD5bmlWqPurpmKkxs4dww6kkeuISRCDjTRqBXjY90fU0x7iPxducyi+LQXWVcu6qTHHcJzE1+BDawt8XWxpryi2mO4AszefDcWxGU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=xry111.site; spf=pass smtp.mailfrom=xry111.site; dkim=pass (1024-bit key) header.d=xry111.site header.i=@xry111.site header.b=C7IePpto; arc=none smtp.client-ip=89.208.246.23 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=xry111.site DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1718441712; bh=gjwUXfnpJrMIPFPi48+TIaXScjHDYpomx5mQ/+7wIGg=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=C7IePpto9XQdhZ0+o4x8Pi2AqxX1rurIZRgQWuTDAizCNamJN8Jjkxk59QxJzN41l XnhAjNNgw0nCFF9pz7EuECbOJ2RWIzdzIiiwQeiJKj7JHPXfULBTGGQyVuq4qD27aw 9uf1HnHz/BpFdYMJjKaRRGme9ygi8tucgdhUKe5U= Received: from [192.168.124.13] (unknown [113.200.174.91]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 0115667456; Sat, 15 Jun 2024 04:55:09 -0400 (EDT) Message-ID: Subject: Re: [PATCH] LoongArch: Define __ARCH_WANT_NEW_STAT in unistd.h From: Xi Ruoyao To: Huacai Chen , Arnd Bergmann Cc: Huacai Chen , 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 Date: Sat, 15 Jun 2024 16:55:08 +0800 In-Reply-To: References: <20240511100157.2334539-1-chenhuacai@loongson.cn> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.52.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Sat, 2024-06-15 at 16:52 +0800, Huacai Chen wrote: > Hi, Arnd, >=20 > On Sun, May 12, 2024 at 3:53=E2=80=AFPM Arnd Bergmann wro= te: > >=20 > > On Sun, May 12, 2024, at 05:11, Huacai Chen wrote: > > > On Sat, May 11, 2024 at 11:39=E2=80=AFPM Arnd Bergmann wrote: > > > > On Sat, May 11, 2024, at 16:28, Huacai Chen wrote: > > > > > On Sat, May 11, 2024 at 8:17=E2=80=AFPM Arnd Bergmann wrote: > > > > CONFIG_COMPAT_32BIT_TIME is equally affected here. On riscv32 > > > > this is the only allowed configuration, while on others (arm32 > > > > or x86-32 userland) you can turn off COMPAT_32BIT_TIME on > > > > both 32-bit kernel and on 64-bit kernels with compat mode. > > > I don't know too much detail, but I think riscv32 can do something > > > similar to arm32 and x86-32, or we can wait for Xuerui to improve > > > seccomp. But there is no much time for loongarch because the Debian > > > loong64 port is coming soon. > >=20 > > What I meant is that the other architectures only work by > > accident if COMPAT_32BIT_TIME is enabled and statx() gets > > blocked, but then they truncate the timestamps to the tim32 > > range, which is not acceptable behavior. Actually mips64 is > > in the same situation because it also only supports 32-bit > > timestamps in newstatat(), despite being a 64-bit > > architecture with a 64-bit time_t in all other syscalls. > We can only wait for the seccomp side to be fixed now? Or we can get > this patch upstream for LoongArch64 at the moment, and wait for > seccomp to fix RISCV32 (and LoongArch32) in future? I'm wondering why not just introduce a new syscall or extend statx with a new flag, as we've discussed many times. They have their own disadvantages but better than this, IMO. --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University