Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp1261243rdb; Fri, 20 Oct 2023 13:07:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGi/0zbPPuqqr67CXzts5thnlkZBZ2xU7gWibLki7qJYfQUouMpg7jLjMdS7l4zbaFXZFvm X-Received: by 2002:a05:6a20:3d1e:b0:129:3bb4:77f1 with SMTP id y30-20020a056a203d1e00b001293bb477f1mr3273031pzi.0.1697832451774; Fri, 20 Oct 2023 13:07:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697832451; cv=none; d=google.com; s=arc-20160816; b=qW84VE+75cdFzFS4i5zZlISd/ApwNFy2hKzpjHv4tunUwc//tPPq0iPBTD4mxB2Feh VUEngf/R+xh3i87tgY/mQu+3agg4YPBObA8UAL+8uCnBV3CdiF4wLBonviqRcVgtsujW pkNOB+ic+M1/IkvHTa7fWU9MoHR7/m8tUz1swDZf37o0cWhrVW4K0yrgyrxMdnJQ04oS FIYs7lvEnr31ys4ve8BvK40S+91WOL+3If41+4UzwkDalGyLYCSfSp8Fy9F7EfyjVeRH zxYoGfn3+FbiZFFclvCDEM+bm0/DQ3VhUoedl0StzTxnDEMh8hQlDfc+08H+E58nPUD1 j9WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:subject:cc:to:from :date:references:in-reply-to:message-id:mime-version:user-agent :feedback-id:dkim-signature:dkim-signature; bh=krgRG5ssPVrKu1an7h2M8y5D/EOyXr2xu6O1a2sTjg4=; fh=z5NHRk7xsPb5uQ34Nb/oAsrgQOMMKBsnMSdjWS7iiJ4=; b=x3bJ3X9axFNNM+fO8HWv3Fr7mLHaQcJsnK0qDGbChjxjPWs5PGmO5jUvVThr/iaqOm 9Yvx5XGzvrqfstPjdotWtbCXYY9P8F+iu26w3CWHhbQfHf7GlsTU+nXa0WYYRRLuGg0v /xopx0t8Zxgbe9pvolvxcc1L+Ardv5xR1vcPZtuksrW4BhMYadaarciso+8TE02S40+p YyARkrJbyFJw8em9tgp6PrZkSIiulRJijQtMcqqhPZffqD7m/M3iRAUtEObNdB+1WBBS 9uDCWvzGMnXiJOFhwgWS7sqZUsCc4Y9G7DMfIggC8E5nFcxPTvo7hw4wUa/2F8+ImWNy T1uA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=BXBnjeZt; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=bKKQDZX+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id b3-20020aa79503000000b006bec15892c9si2439459pfp.141.2023.10.20.13.07.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 13:07:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=BXBnjeZt; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=bKKQDZX+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (Postfix) with ESMTP id 6B8448373198; Fri, 20 Oct 2023 13:07:29 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229836AbjJTUHW (ORCPT + 99 others); Fri, 20 Oct 2023 16:07:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230043AbjJTUHV (ORCPT ); Fri, 20 Oct 2023 16:07:21 -0400 Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20D19D63; Fri, 20 Oct 2023 13:07:18 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 5F1395C0040; Fri, 20 Oct 2023 16:07:17 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Fri, 20 Oct 2023 16:07:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-transfer-encoding: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=fm2; t= 1697832437; x=1697918837; bh=krgRG5ssPVrKu1an7h2M8y5D/EOyXr2xu6O 1a2sTjg4=; b=BXBnjeZtYkZ/AwNYLeUxSVzX8yFEAxcqK/bYd/7us0Ezas47U00 jHjcHlIoqkDdriTshuakzddt+3Q/FyaF6FwiDMI6oiUXJ/BoOK2nrjbf/8uz7ABl cdh2LUU32dScffQulKc8UUcc88ajZFrUlM2s8h5AQy/UgfoGeMzBL07NV+vcJCcX pJkW5bD2xSCDdhvccdO75ShOHQGXAZ6I1QXer0+N8AUCrnCRvxL+7bD54oQxSXVc r0MLGvQbtjZ9I+Ymk3IKeOzmwHFtWP/5TjQ3J/hMhuFeJ7NsxR+QG0PEkYesbBRX 16gzuVLWjT3iEGCRazEIPAysmBLeZKB/kRQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :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=fm3; t= 1697832437; x=1697918837; bh=krgRG5ssPVrKu1an7h2M8y5D/EOyXr2xu6O 1a2sTjg4=; b=bKKQDZX+o61ziEh51I5e2IjOUU5kWhBjRoa/w0GEWg/MzuyoAmP OgyHLQqdTlDDb9wA3VPKRKpMnIxmcvu8SwnUQgJ+uvkPTfh4snUtjz3OTEWwwK4h r539oOsgvXwJ7HIzMFAx8KCH/Chs1oU3UEuKac+Ck4FUXfAYXkX+fN+TQWjsKT8d 32EzA+K9ZnZPOqVenDkETTf7tuBawHw2nkT4C7TsqmtG34/ElGae3XRQu3BNyFJK cgLCo+09EzJJuITZv8TeXXAEJskaiekml9L8f/5Dq8Bp/zd6T3h6fek/2xJiF6qB UbTmhtbug7h/pRHTKkT0fn5PTaGYhCeSYGA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrjeekgddugeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtgfesthhqredtreerjeenucfhrhhomhepfdet rhhnugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrg htthgvrhhnpeegfeejhedvledvffeijeeijeeivddvhfeliedvleevheejleetgedukedt gfejveenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grrhhnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id D0424B6008D; Fri, 20 Oct 2023 16:07:16 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-1048-g9229b632c5-fm-20231019.001-g9229b632 MIME-Version: 1.0 Message-Id: <5e45b11b-853d-49e6-a355-251dc1362676@app.fastmail.com> In-Reply-To: References: <20231020132749.1398012-1-arnd@kernel.org> Date: Fri, 20 Oct 2023 22:06:56 +0200 From: "Arnd Bergmann" To: "Alexei Starovoitov" , "Arnd Bergmann" Cc: "Yonghong Song" , "Alexei Starovoitov" , "Daniel Borkmann" , "Andrii Nakryiko" , "Chuyi Zhou" , "Tejun Heo" , "Martin KaFai Lau" , "Song Liu" , "John Fastabend" , "KP Singh" , "Stanislav Fomichev" , "Hao Luo" , "Jiri Olsa" , "Oleg Nesterov" , bpf , LKML Subject: Re: [PATCH] bpf: hide cgroup functions for configs without cgroups Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 howler.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 (howler.vger.email [0.0.0.0]); Fri, 20 Oct 2023 13:07:29 -0700 (PDT) On Fri, Oct 20, 2023, at 19:26, Alexei Starovoitov wrote: > On Fri, Oct 20, 2023 at 6:27=E2=80=AFAM Arnd Bergmann wrote: >> @@ -904,6 +904,7 @@ __diag_push(); >> __diag_ignore_all("-Wmissing-prototypes", >> "Global functions as their definitions will be in v= mlinux BTF"); >> >> +#ifdef CONFIG_CGROUPS >> __bpf_kfunc int bpf_iter_css_task_new(struct bpf_iter_css_task *it, >> struct cgroup_subsys_state *css, unsigned int flags) >> { >> @@ -947,6 +948,7 @@ __bpf_kfunc void bpf_iter_css_task_destroy(struct= bpf_iter_css_task *it) >> css_task_iter_end(kit->css_it); >> bpf_mem_free(&bpf_global_ma, kit->css_it); >> } >> +#endif > > Did you actually test build it without cgroups and with bpf+btf? > I suspect the resolve_btfid step should be failing the build. > It needs > #ifdef CONFIG_CGROUPS > around BTF_ID_FLAGS(func, bpf_iter_css_task* No, I did test with a few hundred random configurations, but it looks like CONFIG_DEBUG_INFO_BTF is always disabled in my builds because I force-disable CONFIG_DEBUG_INFO to speed up my builds. I tried reproducing it with CONFIG_DEBUG_INFO_BTF enabled and it didn't immediately fail but it clearly makes sense that we'd need another #ifdef. Arnd