Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp2948062rdd; Sat, 13 Jan 2024 08:18:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IFYo7W7jWO2o14caWMlqqcP/6anwjoPFu+f/twSlaB07MjjdUFpUTilCEwpgV4TQ7mlTY/5 X-Received: by 2002:a05:620a:47de:b0:781:92f1:caca with SMTP id du30-20020a05620a47de00b0078192f1cacamr5211859qkb.69.1705162688697; Sat, 13 Jan 2024 08:18:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705162688; cv=none; d=google.com; s=arc-20160816; b=d1HWv+YbC3mJ14yAfIBXSdsgEpgjARCmkxX1BSRSRuuHlspaIXjjHgI6ufFheK3UK+ 2cPA1BdfYtokHJFjR9zsk5ruauL47eWMl5a4COvGI5gmrGfx3F3lleUYP0UoaCVTpZVv Q+8AWJI0VM50qy4YBh5UfHUvoRpEZ7HEvCpt6bDBmo6p2kWjrXa5Y76Is1+NFD0YJ5eS 8071qEJR4GMxEj+97mct8RqsDwyMf8Z3z6M9UqbEcNCBmgQwTa/tTZ7LBpGJXqjxHT4z +II8QA3LDINofjdndnDT9tz/DdKlNCDIU8HOujOKTf4OAOB5AypdyBjZ73d67h58URfo pJrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:feedback-id:dkim-signature:dkim-signature; bh=MEDYmM5cVkzuxdcLusRM8oPzUPvOS7c6CVBKYOnEpUQ=; fh=cUMJPj0nAKzqtwX1SvDi51wcwwUYSMhIRAEIKyWefWQ=; b=aPgILrkEUtt5gsB+ybPL6FAzecROHDdgaqv76Kq54TIGsw0JzQeGjV7V3SayLXfL53 w3NBV1vQqtmO+oGsDcqmN9CUV9+9kZx1pWi8AgNf8JvOmv/i60eC82nYH16E17BEVgNJ hVD0dNe0IRlQhApPpeRVB0clatq+l39+GQIR33EN23jp93g2gAiSWnBycPmY7D7NPiuq O3I0gi7BgYO79Ym+86acZKfmkIdpNlmolt5HyVpad95IkoQPKcXId5vqstI0MSObZTHx Zpvu6TlUNglusVBkJeUesq21AsAOC8xkKz2XpLwNWsqSqCESC9IxBywaz/mtVOO2LZYu A3ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dxuuu.xyz header.s=fm1 header.b=Xnzpsfc1; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=MJDYuIZn; spf=pass (google.com: domain of linux-kernel+bounces-25332-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25332-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id f21-20020ae9ea15000000b0078337e502f8si4911264qkg.688.2024.01.13.08.18.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Jan 2024 08:18:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-25332-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@dxuuu.xyz header.s=fm1 header.b=Xnzpsfc1; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=MJDYuIZn; spf=pass (google.com: domain of linux-kernel+bounces-25332-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25332-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 732DD1C212E2 for ; Sat, 13 Jan 2024 16:18:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AA5544C87; Sat, 13 Jan 2024 16:17:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=dxuuu.xyz header.i=@dxuuu.xyz header.b="Xnzpsfc1"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="MJDYuIZn" Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D594A23AD; Sat, 13 Jan 2024 16:17:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=dxuuu.xyz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=dxuuu.xyz Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id CD45E5C015C; Sat, 13 Jan 2024 11:17:47 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sat, 13 Jan 2024 11:17:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dxuuu.xyz; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1705162667; x=1705249067; bh=MEDYmM5cVk zuxdcLusRM8oPzUPvOS7c6CVBKYOnEpUQ=; b=Xnzpsfc1Nl63sjp7BTJAIuCmEp cUpfhwChKEfReR1Psw6r7mE2+aRXLGMYrTQdE7y8dEkJD1RhelN3XbuAPsPqdfwU 8F9wkYxPexlfkc1FiyJhf61fKWJs59ruedYiDNd+fnK4FYZ56A/5Igw1X5eqztxu F+6yO/0WBk2kvx5W/xNl5M5lAuqmfRWOY1qi2TJASnqAGFoJd7DnVQ0kFh9ae1+G w4NiVKy1dL/Ofk8tkJHCR4gIm2jv6CHpPYKIH5fGBMxg0kdIVczBjKzuMlr8ML6Z 547+2kg8keGGTxL8kJy+e45ajDM97oOFsCNJDUWtBZc5ZyG+75NZgo7H3RQQ== 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:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1705162667; x=1705249067; bh=MEDYmM5cVkzuxdcLusRM8oPzUPvO S7c6CVBKYOnEpUQ=; b=MJDYuIZnfcoNAXxq7SZfX0nbx40/W8OL/awF37AflUbi df1zwyv8Yl0LONbHxWUbygOojfYFXP5TJtIBeTAjdotnShknXgSdlNdYthgFaV+q gftOJqPQ6+6m2a8si7ANLuwB3j7JqGomuHRqamhB3P6aHp4W8eMmnehIXiLPdb4i z2+ZIwDbKnMdMEnqE5CwhgshtYKvcKP58Fpc77SVsEuYSBfnqlcTjHdQLmUbyYg9 SReb9RXWbBnm/FrIYhIg4wT57iZeBbfkihA3LjBHvT7LA0ABEMr/9zJDfUN+zLfC Eshnw3CTKpJFJrglCgpOzqUtGf0scEsZOd298aLQfw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdeijedgkeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehttdfstddt tddvnecuhfhrohhmpeffrghnihgvlhcuighuuceougiguhesugiguhhuuhdrgiihiieqne cuggftrfgrthhtvghrnhepvdefkeetuddufeeigedtheefffekuedukeehudffudfffffg geeitdetgfdvhfdvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepugiguhesugiguhhuuhdrgiihii X-ME-Proxy: Feedback-ID: i6a694271:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 13 Jan 2024 11:17:45 -0500 (EST) Date: Sat, 13 Jan 2024 09:17:44 -0700 From: Daniel Xu To: Jiri Olsa Cc: linux-input@vger.kernel.org, coreteam@netfilter.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, netfilter-devel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-trace-kernel@vger.kernel.org, fsverity@lists.linux.dev, bpf@vger.kernel.org, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, cgroups@vger.kernel.org, alexei.starovoitov@gmail.com, quentin@isovalent.com, alan.maguire@oracle.com, memxor@gmail.com Subject: Re: [PATCH bpf-next v3 0/3] Annotate kfuncs in .BTF_ids section Message-ID: References: <2dhmwvfnnqnlrui2qcr5fob54gdsuse5caievct42trvvia6qe@p24nymz3uttv> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Hi Jiri, On Sat, Jan 13, 2024 at 02:57:40PM +0100, Jiri Olsa wrote: > On Fri, Jan 12, 2024 at 01:03:59PM -0700, Daniel Xu wrote: > > On Fri, Jan 12, 2024 at 05:20:39PM +0100, Jiri Olsa wrote: > > > On Sat, Jan 06, 2024 at 11:24:07AM -0700, Daniel Xu wrote: > > > > === Description === > > > > > > > > This is a bpf-treewide change that annotates all kfuncs as such inside > > > > .BTF_ids. This annotation eventually allows us to automatically generate > > > > kfunc prototypes from bpftool. > > > > > > > > We store this metadata inside a yet-unused flags field inside struct > > > > btf_id_set8 (thanks Kumar!). pahole will be taught where to look. > > > > > > > > More details about the full chain of events are available in commit 3's > > > > description. > > > > > > > > The accompanying pahole changes (still needs some cleanup) can be viewed > > > > here on this "frozen" branch [0]. > > > > > > so the plan is to have bpftool support to generate header file > > > with detected kfuncs? > > > > Yep, that's the major use case. But I see other use cases as well like > > ok, any chance you could already include it in the patchset? > would be a great way to test this.. maybe we could change > selftests to use that I haven't start working on that code yet, but I can. Here is my plan FWIW: 1. Bump minimum required pahole version up. Or feature probe for kfunc decl tag support. Whatever is the standard practice here. 2. Teach bpftool to dump kfunc prototypes, guarded behind a flag. 3. Flip bpftool flag on in selftest build and remove all manual kfunc prototypes atomically in 1 commit. I thought it'd be nicer to do it incrementally given all the moving pieces. But if we want to land it all at once that is ok by me too. Thanks, Daniel