Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6460724rwr; Tue, 2 May 2023 00:16:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5h/1OxqfEAFBMGazkHs3iucodgQe3VKHHraL7La3EBAyM37iZ7fld8qsI/1Xy/RpLQxcqx X-Received: by 2002:a05:6a00:842:b0:5a8:8535:18b with SMTP id q2-20020a056a00084200b005a88535018bmr23384933pfk.11.1683011791755; Tue, 02 May 2023 00:16:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683011791; cv=none; d=google.com; s=arc-20160816; b=WRW/YeX2NS6AyCEtDkaVWUWc3CaD5wX1+jwEdgubVvWcX28Af6VgS3Wd4cVHpTHScO 5APYaR75Iflio9ClykBV9M/JfqxG4dTAqicr4+UPZfV2YkqgKFAmOrUM+JO20IB69O1A Yi5UyQMDuW9AWb0h0bXmIYQBQzrEB+ditdalBJCTsLDw3E1oqG/vRJA8BeJmFEJ804la tgSNkkooZzsjK9FUX9g+Nsnq4TxdsFVa5AfkD4VycosKaWOviI5vdMIUW7Aj4RCc7ttu 1w1AQwdnne1B+gurPsdEjCGs6EFEyTBBQraTe7BGTat2oSuZLkD9aVbdiP0paNTsu9th VQ6A== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Yrld4R/O/5Feb/cth5xdXFdjIJv1/E5nO0hO+tZp/FE=; b=ygqXBxtKz3voDIb6zn/5haOlneD1W8+Ri+e5XERlUT9riLWKHyjFpNpDrlVKvNzUNe SdHmv9bo7uc9VfvTp6Doof3SRSUnIaPN10acsqZJUcgMveGXamhYDmj9bVa9/8h3JjK2 ORlBqM7sT5boSutYF5d5++jtcQZBga1aUZ9KHFV7WKPX5WQDBV4UerEvgA7PZXWV6LY6 GnuaOFioX9FBIhY19TESK9jxFaMLzb3CWaA20k0ZQwQxVGUNhFpNQ4kgLa3X0KEKO3rX vAcWdwFc8bs/DYoy6fsHX7g0jjODItc+bLtF9ITRpnO85j6dHzEqnWamrIRa+SSYcShu ygxw== 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 c5-20020a6566c5000000b0051b4140f6cbsi29534553pgw.149.2023.05.02.00.16.17; Tue, 02 May 2023 00:16:31 -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 S229863AbjEBG7d (ORCPT + 99 others); Tue, 2 May 2023 02:59:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229379AbjEBG7b (ORCPT ); Tue, 2 May 2023 02:59:31 -0400 Received: from 1wt.eu (ded1.1wt.eu [163.172.96.212]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DF44C95 for ; Mon, 1 May 2023 23:59:29 -0700 (PDT) Received: (from willy@localhost) by mail.home.local (8.17.1/8.17.1/Submit) id 3426xR0k027963; Tue, 2 May 2023 08:59:27 +0200 Date: Tue, 2 May 2023 08:59:27 +0200 From: Willy Tarreau To: Thomas =?iso-8859-1?Q?Wei=DFschuh?= Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] tools/nolibc: remove LINUX_REBOOT_ constants Message-ID: References: <20230428-nolibc-reboot-v1-1-0bca02d20ba6@weissschuh.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Tue, May 02, 2023 at 08:47:15AM +0200, Thomas Wei?schuh wrote: > On 2023-05-02 08:32:15+0200, Willy Tarreau wrote: > > On Fri, Apr 28, 2023 at 05:52:11PM +0200, Thomas Wei?schuh wrote: > > > The same constants and some more have been exposed to userspace via > > > linux/reboot.h for a long time. > > > > > > To avoid conflicts and trim down nolibc a bit drop the custom > > > definitions. > > > > For me it breaks the build when including nolibc directly, so most > > likely we need to include certain files: > > Indeed, sorry no idea how I missed that. No worries, it happens to me as well and that's the benefit of cross-testing ;-) > The conflict looks like this: > > In file included from nolibc-test.c:18: > sysroot/x86/include/linux/reboot.h:10: warning: "LINUX_REBOOT_MAGIC2" redefined > 10 | #define LINUX_REBOOT_MAGIC2 672274793 > | > In file included from sysroot/x86/include/nolibc.h:98, > from sysroot/x86/include/errno.h:26, > from sysroot/x86/include/stdio.h:14, > from nolibc-test.c:15: > ... and all the other ones. > > > > The following trivial fix on top of my patch would fix the problem: > > diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h > index 5d624dc63a42..9d27131c224e 100644 > --- a/tools/include/nolibc/sys.h > +++ b/tools/include/nolibc/sys.h > @@ -21,6 +21,7 @@ > #include > #include // for O_* and AT_* > #include // for statx() > +#include // for LINUX_REBOOT_* > > #include "arch.h" > #include "errno.h" Indeed it works for me as well. > Want me to send a v2 or will you fix it up on your side? It depends. If for you it's a fix and needed for 6.4 (or maybe older), then that one is needed with the "//" comment, and it will later conflict with your previous cleanup patch that's already queued. If you're fine with having it queued for 6.5 only however, then I'll just edit your patch and add that above. I tend to think the second solution is sufficient given that nobody complained till now ;-) Just let me know, thanks, Willy