Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp5473709rdb; Sat, 16 Sep 2023 20:35:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGqGsp8BnMwSTf6IjhS3zm9LfZs6Jfp2YYQQkSK9IBThEQS8TYm5y0N79UuYJo9aIdfaWPM X-Received: by 2002:a05:6358:c29:b0:12f:22c1:66aa with SMTP id f41-20020a0563580c2900b0012f22c166aamr5613028rwj.3.1694921704611; Sat, 16 Sep 2023 20:35:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694921704; cv=none; d=google.com; s=arc-20160816; b=HFQkpQ3cE4PdhiPeYxDfeomtpFkbvxb9XaQSUhc+4/GqRT9VRsqIHs4vNASrZAuSwi hZSGxl8h/KKIAzy//SN9Ip0BRR0TaYNJ9SPJlkJlzJvsmVIXtS+BiTR5UiUceGfln4bQ nVg48P2S44oYL+I8Yw8MBdHH14O/9QfiZm7sdUOzAh8el85+DnnkEGS1Vn5TSGYHMQrx FyebiId0+vHhYgvnzul9mssYn4EhS2YeV25TAFsTVn4IMIU0yEIlnYgwRQplcvgqM6ta RiHmgdDVrdhaJQKvO/kozomE4qvkZ/r6w2/xtQRqfJw7jWl8/cpewGbCGicdnSUCj3zo 9ucQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=bEpWmnOEMgXD3IiomZvAow6YtjEzPPA0ML97qaR1gGg=; fh=q3eJ70+nPBBOurH5DI6uivZtkSdfT1YhlPrRDAlF5bE=; b=oD7tIiJsUSk88uoog3/4WeZ+hFB8XwHDHV892qKyj2JsjEuj43uhs3VcE6ezktnZg+ OTxxlkvswZdmuHQ9H0HyNv8LGaGDddvwFqXoTFZVge66Ixh9qFaLJgxKIKkkkQgRrio1 kcAB6WqzDrpPP88r7RNWyRHTaPrD9S4PA+sybxL1rOJbPyluDf6CVr2eGZrIhrRLq/k6 V6Ctw4aWMc+R7oAUNQ8KHmW92qJRp1/twJ90t/EFTIEW/ixBKd8ITd1FaIlfeXLP+Sxq 3kya4YJ6loY+cYk8dVEKNxam2WK3j0Nrgr1x4pOQS0vebYaeRBwP7spjPSoB4QRIXzrF 6zqQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id m18-20020a170902c45200b001c3e9170068si5599805plm.61.2023.09.16.20.35.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Sep 2023 20:35:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 50C0283B16F3; Sat, 16 Sep 2023 20:35:02 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230489AbjIQDIV (ORCPT + 99 others); Sat, 16 Sep 2023 23:08:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbjIQDHt (ORCPT ); Sat, 16 Sep 2023 23:07:49 -0400 Received: from 1wt.eu (ded1.1wt.eu [163.172.96.212]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4A0E11BC; Sat, 16 Sep 2023 20:07:43 -0700 (PDT) Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id 38H37Xt0009951; Sun, 17 Sep 2023 05:07:33 +0200 Date: Sun, 17 Sep 2023 05:07:33 +0200 From: Willy Tarreau To: Thomas =?iso-8859-1?Q?Wei=DFschuh?= Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , Shuah Khan , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH 4/4] tools/nolibc: automatically detect necessity to use pselect6 Message-ID: <20230917030733.GG9646@1wt.eu> References: <20230914-nolibc-syscall-nr-v1-0-e50df410da11@weissschuh.net> <20230914-nolibc-syscall-nr-v1-4-e50df410da11@weissschuh.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230914-nolibc-syscall-nr-v1-4-e50df410da11@weissschuh.net> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Sat, 16 Sep 2023 20:35:02 -0700 (PDT) On Thu, Sep 14, 2023 at 06:01:20PM +0200, Thomas Wei?schuh wrote: > We can automatically detect if pselect6 is needed or not from the kernel > headers. This removes the need to manually specify it. > > Signed-off-by: Thomas Wei?schuh That's indeed cleaner, I can't find the reason why we didn't do it like this initially, I suspect that maybe we were having __NR_select defined but not usable, I don't know. I've found it first introduced with nolibc commit 28a7178 ("nolibc: fall back to pselect6() on aarch64"), and the test was made before __NR_newselect, so maybe I wanted to be sure not to use pselect6() in case another arch would define it. Let's do as you propose, it's much cleaner and simpler. If we ever find any breakage at least we'll know how to deal with it so I'm not worried. Acked-by: Willy Tarreau Thanks! Willy