Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2156677rwd; Fri, 26 May 2023 02:32:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7lwLWnbgtsaQxtWuewgZSm34RmhffHvjW4fYjEtlzK7s9n/VdceIRVbQhQsn35xShZ/CMX X-Received: by 2002:a05:6a20:428e:b0:10b:6e18:b694 with SMTP id o14-20020a056a20428e00b0010b6e18b694mr1550454pzj.55.1685093565895; Fri, 26 May 2023 02:32:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685093565; cv=none; d=google.com; s=arc-20160816; b=dQUdZKVzWqmJDH+ju66eAM2ko7yREOval3vAARvmgWI06oFQjYt2QknAGOWEh+szez tP/f6gn2MD+K19EcvLGO7SK9vYmOzFpjdtK4DhKnUqis/B14PmMCaQ45wEr4z0CjLgL7 5WhzY274AYYKNaULGQThctYipXy0yOOGsXuJS/Fx/ShOfuu2CbuWuF7SNKU0f2/1KOWt Xflj8txEfg5ewA8IgtaPyx2EPlh/KSGgaxdMLYkPmEvK2BSs+2yZ+YxkLQ4rxE7TkjgJ rUELco1huT2UBAlo6w+a5zxlDTtMAoFrBI6qjSEpVwqDqo2k7D/UeUjWzTUMOh+CfQKQ 7I4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:feedback-id:dkim-signature :dkim-signature; bh=Th5sPJegF565hJ/l2p1q9i7N8Mb/IijkIAurtMCasPA=; b=mp6DYmJ1C5O7iN/XAvcVGHeBcf9lrfA4Itr7we0ofrO7yWOzJxSXf/rVTMyUbpiimA BJdkyKQS5ahmRaECv8xS39vKuPTfCWNDtrptxNKMS8VKK8tb+meNtT6PzA5H70+NlrqG vSSsnWSFRqIgp0S4kfHMNkssOQylBgb9zAFGIKmhdIY7LzTd/6kIaxCvWaHXCXZuB5w3 waT/Cb+5wjS/5bRZnhyzOe8YG0vcIz7c58HiGzydBv9NItyjVz5/RRH8XtB4NiEgEzvb F482EgNGfD2/eOJTf3omET/yRVH2FLt7Xjt0CvmssLaeEWyQ4bHH3+mikhWSglkpVOT/ 2oJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=WLdX1vOq; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=S9x+unDI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p7-20020a625b07000000b0064eeb3d3a19si3707528pfb.158.2023.05.26.02.32.32; Fri, 26 May 2023 02:32:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=WLdX1vOq; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=S9x+unDI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242723AbjEZJV4 (ORCPT + 99 others); Fri, 26 May 2023 05:21:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230240AbjEZJVx (ORCPT ); Fri, 26 May 2023 05:21:53 -0400 Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4C921B1; Fri, 26 May 2023 02:21:23 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 5C22D5C00DF; Fri, 26 May 2023 05:21:23 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Fri, 26 May 2023 05:21:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type: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=1685092883; x=1685179283; bh=Th 5sPJegF565hJ/l2p1q9i7N8Mb/IijkIAurtMCasPA=; b=WLdX1vOqYDygwHykwe Ee1k4Mi4aY19PjwhIUM5R+sTxV2UZj3xZgs9a4hOSbaJSvnpCtw4w/V/aezTeWjO NNFVuzIYS9wn+wOJFEMeDSsaqoj9FA87kv+D23Miq5GAYLk9cBGSIDe60vSsCD8P uORjVca+i9z/gRNEOvO2Or+FWZPhZb605zvlbbjrb9w0paiRWR9RWVgmW+jGsj3w vE9wg+So10AKZG90QZfnCEaJU/5M84Fm1b4zYa4TyIxn5bUGQRwJ8IUvNV3nndXk Nqpw3WJKRZ72cq73ImtrssqBJs/x9qxN4G2wnetYr11haEgd+1hMsmdIXRdaHfWd z7vA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1685092883; x=1685179283; bh=Th5sPJegF565h J/l2p1q9i7N8Mb/IijkIAurtMCasPA=; b=S9x+unDIjqon9YIvHBC9tHY3Z5AEs uA44buB/NMQ7bZtIt4vOmJmFBgdaM3TdBrFsPvBkQ6CAvKGu+KFztRYftm+4GEER 5ucf0+RVdrURUED12Eje4k/JicX0YTw5mG/pnl0jH160P0hzesVn3BOmluNCv4mv LA6dgyCd75yrtStphXv9BIEs1TdaW4RnLgyLmx274PQDo9xd6fWRZbFUP32tV09r rD+3/wMWYcftCYEbzVuoA1MmLEYi2LDjUA5nU4axOZWTs135XYvOQDDmXKUUm8PL 9vi6RWUiIq2WjHPtPM/CdXy7w+nNHEArgBybD2ux0chN6ACQAtXDKMJ/w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeejledgudegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepffehueegteeihfegtefhjefgtdeugfegjeelheejueethfefgeeghfektdek teffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 07AFFB60086; Fri, 26 May 2023 05:21:23 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-441-ga3ab13cd6d-fm-20230517.001-ga3ab13cd Mime-Version: 1.0 Message-Id: In-Reply-To: References: Date: Fri, 26 May 2023 11:21:02 +0200 From: "Arnd Bergmann" To: "Zhangjin Wu" , "Willy Tarreau" Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-riscv@lists.infradead.org, "Palmer Dabbelt" , "Paul Walmsley" , thomas@t-8ch.de Subject: Re: [PATCH 04/13] selftests/nolibc: syscall_args: use __NR_statx for rv32 Content-Type: text/plain X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 24, 2023, at 19:48, Zhangjin Wu wrote: > > +static int test_syscall_args(void) > +{ > +#ifdef __NR_fstat > + return syscall(__NR_fstat, 0, NULL); > +#elif defined(__NR_statx) > + return syscall(__NR_statx, 0, NULL, 0, 0, NULL); > +#else > +#error Neither __NR_fstat nor __NR_statx defined, cannot implement > syscall_args test > +#endif > +} Does this need to work on old kernels? My impression was that this is only intended to be used with the kernel that ships the copy, so you can just rely on statx to be defined and drop the old fallbacks (same as for pselect6_time64 as I commented). Arnd