From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A58FA2E407 for ; Fri, 5 Jan 2024 15:19:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VQDSFW17" Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-a26f73732c5so180652066b.3 for ; Fri, 05 Jan 2024 07:19:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704467949; x=1705072749; darn=lists.linux.dev; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:from:to:cc:subject:date:message-id:reply-to; bh=cXM8mUu2b7I5NINWgE1xN7lsAgN9ikjmrQenDxvMoYo=; b=VQDSFW176+CHe0duC2D/VWLO0jl0cSwfPeQqdz1e6jzao2qO6yoLR6plkK5Wes8l5l mzaQv6xc5qjNWzKx20OcAZoc00yhUDXBL0xdZuY46nRCRD/0bCP0tDhnWVfJz1fSw+mE g/e6CeO2SYAzF1QT87hlSg6iWib+qy+ZocOZ31lc+wRqgjhrjzjMjBPP/OnL3M17GxZv 3E99aQGVHxG0c4qvx0NV27TiVx9IXlCFhXzWDhEw5AuNz7G4nbQrphFcDhALSdFxOEE8 wN6rTlpWI9dooM/ftRRizxF+5aXJtSXw9odpYHxmag94PTOq3Ng6pKk5HlBo/hI3t6Fs 98dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704467949; x=1705072749; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=cXM8mUu2b7I5NINWgE1xN7lsAgN9ikjmrQenDxvMoYo=; b=g4kOHHNIMkUQnuNlR2//izYgQoy8rwPfX4VH1zj/fs+KwxwyAftVVtHpuM7zvnLvQQ NJ8Ei8rNUIdS1B1mj1lBk+IdOVZdPgqnOoYr8ziMVaDumvMg/5LEkCgVcxiRTeLkcIN2 OZiVbrM0HBS9IxVNNyyiAWDH6gmMmPE7rDcx8tGVKZCxi9QubUAODq4kvnZNTVjNk7zP iN1xJcBkFP7o8KHkYBQ+7jyXDGo/Br63NCky0eeFfkgE4WcE7yNCfmWyk87tpe+Y6Rvw v3nUlYLVUGHJC3BzwGUFVmQAXC+t3iPxSdYgHdsxd3vClECZgNBRHGeu4iE/6L3vO4jM zNnw== X-Gm-Message-State: AOJu0YzgPUEWJTVVtXbBP5rGurKK/UKRmTXcY61me4QK563Qtli+uzM1 UZxuIKoqpbrD2zTN5id97jA= X-Google-Smtp-Source: AGHT+IHMylC1f/uOwiPnE54XyvPyUNJflvpVz3FB0ZLbHNPVoLKw4ML5AEQ2yE/zVzZzRQJG9qQEHw== X-Received: by 2002:a17:906:6a82:b0:a23:4c5d:dab4 with SMTP id p2-20020a1709066a8200b00a234c5ddab4mr1164549ejr.62.1704467948901; Fri, 05 Jan 2024 07:19:08 -0800 (PST) Received: from krava (2001-1ae9-1c2-4c00-726e-c10f-8833-ff22.ip6.tmcz.cz. [2001:1ae9:1c2:4c00:726e:c10f:8833:ff22]) by smtp.gmail.com with ESMTPSA id mj20-20020a170906af9400b00a27a7fa8691sm979246ejb.137.2024.01.05.07.19.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 07:19:07 -0800 (PST) From: Jiri Olsa X-Google-Original-From: Jiri Olsa Date: Fri, 5 Jan 2024 16:19:06 +0100 To: Daniel Xu Cc: bpf@vger.kernel.org, fsverity@lists.linux.dev, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, cgroups@vger.kernel.org, netdev@vger.kernel.org, alexei.starovoitov@gmail.com, olsajiri@gmail.com, quentin@isovalent.com, alan.maguire@oracle.com, memxor@gmail.com Subject: Re: [PATCH bpf-next v2 0/3] Annotate kfuncs in .BTF_ids section Message-ID: References: Precedence: bulk X-Mailing-List: fsverity@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Jan 04, 2024 at 07:45:46PM -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]. > > [0]: https://github.com/danobi/pahole/tree/kfunc_btf-mailed great, lgtm.. seems I've got the tags in right places (128 kfuncs) please send it on the list once you're done with that, so we could comment on that thanks, jirka > > === Changelog === > > Changes from v1: > * Move WARN_ON() up a call level > * Also return error when kfunc set is not properly tagged > * Use BTF_KFUNCS_START/END instead of flags > * Rename BTF_SET8_KFUNC to BTF_SET8_KFUNCS > > Daniel Xu (3): > bpf: btf: Support flags for BTF_SET8 sets > bpf: btf: Add BTF_KFUNCS_START/END macro pair > bpf: treewide: Annotate BPF kfuncs in BTF > > drivers/hid/bpf/hid_bpf_dispatch.c | 8 +++---- > fs/verity/measure.c | 4 ++-- > include/linux/btf_ids.h | 21 +++++++++++++++---- > kernel/bpf/btf.c | 4 ++++ > kernel/bpf/cpumask.c | 4 ++-- > kernel/bpf/helpers.c | 8 +++---- > kernel/bpf/map_iter.c | 4 ++-- > kernel/cgroup/rstat.c | 4 ++-- > kernel/trace/bpf_trace.c | 8 +++---- > net/bpf/test_run.c | 8 +++---- > net/core/filter.c | 16 +++++++------- > net/core/xdp.c | 4 ++-- > net/ipv4/bpf_tcp_ca.c | 4 ++-- > net/ipv4/fou_bpf.c | 4 ++-- > net/ipv4/tcp_bbr.c | 4 ++-- > net/ipv4/tcp_cubic.c | 4 ++-- > net/ipv4/tcp_dctcp.c | 4 ++-- > net/netfilter/nf_conntrack_bpf.c | 4 ++-- > net/netfilter/nf_nat_bpf.c | 4 ++-- > net/xfrm/xfrm_interface_bpf.c | 4 ++-- > net/xfrm/xfrm_state_bpf.c | 4 ++-- > .../selftests/bpf/bpf_testmod/bpf_testmod.c | 8 +++---- > 22 files changed, 77 insertions(+), 60 deletions(-) > > -- > 2.42.1 >