Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2219378rwd; Fri, 26 May 2023 03:38:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Vop4SQkfEVcjsl62s6+dCXT4jOy5GTkNDi5juiuhMXwLUeb15GuG+wXzLdQpJ+4eWtxVI X-Received: by 2002:a05:6a20:a41e:b0:100:15c4:23af with SMTP id z30-20020a056a20a41e00b0010015c423afmr1091114pzk.60.1685097533810; Fri, 26 May 2023 03:38:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685097533; cv=none; d=google.com; s=arc-20160816; b=oBN6+MxiLKGXN7lNY5NeUh2jCP7Nd6bqy8RwDLNq5AIMcyAUXtXzNKphFI2D5kwD3p PD4KitmG7nDrmwGZalwI+2MKO66Gj1IfTmmW9LwacwyfUnHro/UahgRSSYbpC47ytSpt Qd6h6lAUwgY/EIzouRP4eA9agDChlkIC32LNm4aEnN61Gb0wcN/TAuYV6WYSisxsyIld 5+Lb3wFdzfDmx19UE70yoTamdaK678vGBfLrwCiyj4yz5DY0tGMwEuAR8TmPDzH9GEKB mxKZFqtrIuTjWXVX+pQStPt64KfAzabkJeQ943HAwlMVNfr9lwuuzkTHplE4COMnA1LH dtzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=C12dXO4NSctSsLzJdhRRzqPmWxVKdQ/73+Wnm96Qa4E=; b=e4WYpiUTli0Tb2o+rSlyhr/2mLOLTQv5fLNIcm8KgnUZTcMRmQuwJUIgtGtfjO2P5q joYOsWYJX4H3QKGKyIAACpao4XCamxNXfouRlLctETquf38E2uNctz1UyUy8JVmVLQ9H L3dBE5uBbd9Bw9RtZre1kZpJCr74NWVXJMYHG5FKOdHjzxHdpcnPe/c6Q5tBpZ9/QLDO bY+5qaxaDxlCQVrHFFNvAfF8olK3C0h/KafQQQdMfi22uEYbdfxWogaZuy2FxfkzyVwk ZqjR0lSivDPJDPOrtqc9iOHEisPNuh5Pn7552q8QniZH5+5kXBjeRUvilwVQ2HTQ44nr JCGA== ARC-Authentication-Results: i=1; mx.google.com; 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 126-20020a620684000000b00643b1616d7csi3267538pfg.77.2023.05.26.03.38.40; Fri, 26 May 2023 03:38:53 -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; 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 S242855AbjEZKIF (ORCPT + 99 others); Fri, 26 May 2023 06:08:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229956AbjEZKIE (ORCPT ); Fri, 26 May 2023 06:08:04 -0400 Received: from 1wt.eu (ded1.1wt.eu [163.172.96.212]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1FA519E; Fri, 26 May 2023 03:08:02 -0700 (PDT) Received: (from willy@localhost) by mail.home.local (8.17.1/8.17.1/Submit) id 34QA6Oum011800; Fri, 26 May 2023 12:06:24 +0200 Date: Fri, 26 May 2023 12:06:24 +0200 From: Willy Tarreau To: Arnd Bergmann Cc: Zhangjin Wu , 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 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00,SORTED_RECIPS, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 Hi Arnd, On Fri, May 26, 2023 at 11:21:02AM +0200, Arnd Bergmann wrote: > 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). Yes, as much as possible this is desirable because the purpose is clearly to simplify the build of applications. The reason is that some applications might want to run as well on older kernels, but may miss some syscalls on the nolibc shipped with these older ones. Since the project is quite young, it lags a lot behind what each kernel supports, so it's expected that users will take the most recent nolibc version to benefit from support of syscalls that were already present in older ones. The alternative would be to take the project out of the kernel as it was before but this would likely complicate contributions. However the selftest code is clearly specific to a kernel IMHO, since its goal is to be used to check that the shipped version of nolibc works on this kernel. As such, my view on this is that as long as it doesn't require unreasonable efforts to support older kernels for the userland code, we should try. If sometimes it's a big pain, we should not insist too much, but at least making sure that only the feature in question will not work would be desirable. Thanks, Willy