Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1548394rdb; Wed, 31 Jan 2024 01:51:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IFgV2/uel25E/Oe1Z+3X9YAoqpxzKZQbXIjKGJ6OxTtPYOrMXYhCQBFfANKoO13yvZ5F+r5 X-Received: by 2002:a25:296:0:b0:dc2:279f:f7e with SMTP id 144-20020a250296000000b00dc2279f0f7emr1067134ybc.10.1706694709479; Wed, 31 Jan 2024 01:51:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706694709; cv=pass; d=google.com; s=arc-20160816; b=wICL9bhkkyqNFDgzY4Yoo+53Rf9tOkLgzHr+WgD34YOjUPkWTkizczVoQPdPbyBpCE fv7QYFNhS2aIxA9ZJAAB8MrN3XgxhadxZEIGvlEwlZJ+w6VdLCaMVUm089bgw4zrlDbl ooOTRxrCN9l1+UagID6CuuszzB19z/GAyqwnGqRBrq5E1JvumsAZo0camOzp4GDVQNPy JDBJSJn6P+8kOcRcMccWItIn6kOk4TAsfQtdYXGtSdWfF9YGw+3sW/zwxE4XkDGp6TwF oNYhjauh38JlvNdb/IT2kzadfmoJw7UG3YFuV7oVxuCw9XL7QyyulnskWqyYO4Tpww63 jJJA== ARC-Message-Signature: i=2; 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:date:from:dkim-signature; bh=/O9XgRbkcBJVk7UwNZF0sbS5DqjZwvxc08GdgHW/6js=; fh=eQ3/sx1FFGZjlZ2CdRxneWDSpogUF0zRyBZ8hNn75lU=; b=k3n192+CG4na7AAYD5xNfeBnrt9uxiFtMuWihrtNOLk4q5P7wg3aeOSsT7C8gyBUzF 2dkPI9ShLnZnoVJNunCP0/qezrOACdra3ydWSoxzEWrxdTf97wkkF2C3r9ZPtnOhUQ/t ZOD1tWaFFuKFrihxNnCG9QcSzIRUPUjhhCEg27tAYcG2CS/4KmcCI3WamK/HEr4Zbz/0 rn56UjB+19tPUnh9+8TquqFXZVa+tXW5+plf1uEgA4pbsATYrUti+oj6mv3rLOBLtr3s UqbPI9CN6f/K0LPjgtqjknEzN99x2phdlsYB4/N0oV/ZQdYSwa9vPlNQ2zBRLOGJRF93 RuuA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=KTxWRXkY; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-46162-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46162-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com X-Forwarded-Encrypted: i=1; AJvYcCV2yzCHjwXQZtrd+qg6ouZJqY0vAaNVLtftNR1Gm9NUoxGWifDjmj3Bc5DhHxLzNmFC1Mnj/4/grVSjU6PlgU4RmdHDTYhWuw3MReZY2Q== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id a191-20020a6390c8000000b005cf0e5119fesi9362762pge.304.2024.01.31.01.51.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 01:51:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46162-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=KTxWRXkY; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-46162-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46162-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 71B762849DB for ; Wed, 31 Jan 2024 09:48:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CED9369D05; Wed, 31 Jan 2024 09:47:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="KTxWRXkY" Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) (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 DC63F69944; Wed, 31 Jan 2024 09:47:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706694473; cv=none; b=PCR4HxrtZwrqqxv8fq405tAaSMoV/Y3CAinBx/xwAgcgDqoCRq8rjhMVAXHItdVrfhLJc/jF/q9Izum2Zz1pfebfFBbz6kJhssSE8ZocAVq20zcSsniROL9nCp3Jwe76eI5PCjZWUk4XmbPW38OMtQ334FI4y3356VeWdaUvH/Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706694473; c=relaxed/simple; bh=DyoRHksM8/+nEGDrgKtCPGHGEP6No6QiqsUcI6hix1g=; h=From:Date:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=O7J1oMQ3Q5TrvOIcMZ0buEUuEmUvtLivKdEIxQC4L5GYklgRRAhMkND7nU8x3yuhxCH1B28Yk/1bVvYoJ84t0a5CThYYYhd/9ObAOO1H4sqZynWX632AZoRQ+Eau8gtNKh36HDfhD2ZdVcBoCevIkJMuYxZljvfiH+HfZRxpRlM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=KTxWRXkY; arc=none smtp.client-ip=209.85.208.41 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 Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-55f8abbeeddso416655a12.1; Wed, 31 Jan 2024 01:47:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706694469; x=1707299269; darn=vger.kernel.org; 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=/O9XgRbkcBJVk7UwNZF0sbS5DqjZwvxc08GdgHW/6js=; b=KTxWRXkY5xav+wdirOfHUHK4fx4/L9GKSK8JO3zz9OAWQNWVQnBIfQ9gePFBidWy28 bOy4pNbV9DJsmDbLI2EOqJY5qF0kaOAtpSa409jcFXYFfsDPW8S1rd1ebJGglxSyMWY/ TDfeMmafYvjs9metYlhoRRdjmDx8vH4KrfTpVnDUWLepu4+AMIBlWaXfRQqd/6Bb+T5V 2hpL/Gb68YJmABi0biPuv4Y1oL2q1isc1HJXuYY6GUAHeySFWjupCW2+1CMXHLuKBPaB ZaGfuqRdQ34QcrdEw+1w+Jmkf/2PySPjjlbDk/EK7GkJZja+O7n3JAjnFgzvdFP2bBX8 lbsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706694469; x=1707299269; 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=/O9XgRbkcBJVk7UwNZF0sbS5DqjZwvxc08GdgHW/6js=; b=tfBa57plKot59ybWnu5lLxMsrGX6mWrzIAENVJBXT11OUmC7GfEnXZJqNmW4EymwhO lP6EIyfCKSQ3SxJoY0VKVDFnXGpmmI0JnC/9fXbFEAZPB2hsNlPnfw12fYWq0sWlILsx vMWnj9xhe74BLn4i50onu0T/N6C80v+c5VWkcrXefgQMRz0YSTKajFC4sqY/JD5e0hQc gpeSDSaScFxJLXF71M4hj9fTVco/BMz6Y3ZG1X09dcknWcCfuHdyik8LzzbpY7zjcLqb WY0RqVOdLfL8YdUX3e8ISezChC/WdUXkVH+onNa4ZruOLOh7UcT5Y6SPBlqHGP7TBGSS 9KBg== X-Gm-Message-State: AOJu0YxJTS6MZL+LFZeJ+eDjNSjg865daQvYmszezS5W6To1cTLwxGst rwS18QzY5cGoCHl8KoUTIAUztwVx9Ji5CgX76/eofATCwYIa5TOk X-Received: by 2002:aa7:d3da:0:b0:55f:4d7e:e4e9 with SMTP id o26-20020aa7d3da000000b0055f4d7ee4e9mr677420edr.21.1706694468728; Wed, 31 Jan 2024 01:47:48 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCWiQ74i0rflV78kHDD47By+VknL25M/waMOcUseNfD20dtrpXOOs6Ao+gTVaS8DbJxsRAeqz0D74nt/JzPKas4fElzSMHU34w5JZzRUGMeCAfihCbaCTiQtK30VNQHIpMClOh/RhgzoLzRD/c1G/GVg0n2Xq1yaP8QSGbquEojq3tT0Ngp9tgp1T6NjSPqpuhw4DhU9xq79sMBc5xVg7kfNgh4MfGP1W3tMOXWVvEe5W0CC5fKzqDdHHTTGS1QOI9O9mpkOaAG0lC3hMGyOu6hJjVOqkDF2AtMfPuS4xMj7fCJjzvqm+cUx7U68p5sHDS08r2ExD56T3alGKXX+JFF294bvkxPJwLkg3PUtv/w5GuijywP9P340TIWpJOibm28GzcD4n7N3R2cWhzhCC1ZRuTsBrBzZlEdQDW2w0kXXeNOVnMvePqRJBle9+Wy7OIKJquy1qbLmRF4/H25zBeTsCAH4Wy9nyUOXN8pxxvIVX7wTkzS+UhPMdncPI31/9xJnRQ52G7Mwr6HgtzhnzFvpG8wDV4yMM1b/N6zfStQBk29H6BbZcak5QEGndd41sRMDxxRDBmN3rlsn5DHQVqMqSulzElZgC/jBr455JmuklDm8/pD/zLy/KjDHB+xhJTLEPbpfOgfZCZyVWspgqXl5Dx0u3G27UtAUjenX6FjpCzau 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 h11-20020aa7c94b000000b00558a3268bbcsm5651569edt.53.2024.01.31.01.47.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 01:47:48 -0800 (PST) From: Jiri Olsa X-Google-Original-From: Jiri Olsa Date: Wed, 31 Jan 2024 10:47:46 +0100 To: Daniel Xu Cc: linux-trace-kernel@vger.kernel.org, coreteam@netfilter.org, bpf@vger.kernel.org, linux-input@vger.kernel.org, cgroups@vger.kernel.org, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org, fsverity@lists.linux.dev, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netfilter-devel@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 v4 0/3] Annotate kfuncs in .BTF_ids section Message-ID: References: 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: On Sun, Jan 28, 2024 at 06:24:05PM -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 and bpftool changes can be viewed > here on these "frozen" branches [0][1]. > > [0]: https://github.com/danobi/pahole/tree/kfunc_btf-v3-mailed > [1]: https://github.com/danobi/linux/tree/kfunc_bpftool-mailed > > === Changelog === > > Changes from v3: > * Rebase to bpf-next and add missing annotation on new kfunc Acked-by: Jiri Olsa jirka > > Changes from v2: > * Only WARN() for vmlinux kfuncs > > 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 > > Documentation/bpf/kfuncs.rst | 8 +++---- > drivers/hid/bpf/hid_bpf_dispatch.c | 8 +++---- > fs/verity/measure.c | 4 ++-- > include/linux/btf_ids.h | 21 +++++++++++++++---- > kernel/bpf/btf.c | 8 +++++++ > 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 | 20 +++++++++--------- > 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 +++---- > 23 files changed, 87 insertions(+), 66 deletions(-) > > -- > 2.42.1 >