Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2233302lqo; Mon, 13 May 2024 11:39:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUDPx0XH7U66+GYY3nVg+fICL+Wn7daecXZ8V2mxb9NXhkpE5BJP1Rpf/Xw+6/ZlLKxqnPu/VGIDASFmF2duvO3KFdGsNOvdLpvKgQZIA== X-Google-Smtp-Source: AGHT+IGEfVrDAvHAIchljUagttwOggbdY7SVpEleGUBN75dHVZF8VASTxhGg3sd0RjZbjdpbi+23 X-Received: by 2002:a05:6871:7a81:b0:233:3734:e645 with SMTP id 586e51a60fabf-24172fd7f3bmr12980721fac.59.1715625562666; Mon, 13 May 2024 11:39:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715625562; cv=pass; d=google.com; s=arc-20160816; b=Kfv8IGsGdhWuzfWr3NDxJ9NjKTmdbgJ5T/EOgQK1n89MMSfHrnkWzm5isRyfOphKSI jm4D+VyxribB1Apu36Q0lhV7l5l6bd1bZoshfTeAY/eRZ0fouAwSAMOw2zMXImHgWipk TLwdNJrxAJ5PGaVvvXfpdHvubaxSpy54ozPeVO4Npd8n2x5M/MW8tRv+vQ+joWbnG1Nj SvnWp2cWWe+qJUykYunmP9SIMHLW/cSGY05ATmsP5R4O5YeHZ78xJTmW/p/MIEU3IzRN ysOiSwgHkFR5DU+5hMc3NFfIc9LTDgxJbwLFNvMIwtleCSuhm6jqGc3jjowjKALQPbtF inGA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:feedback-id:dkim-signature:dkim-signature; bh=O8Ls5VMkKDiXpfxNPLZEwkjr2NHHS8FZM/mcfdqCmuk=; fh=LWg+wwzeamR6ohQgT+jBUNYyWf2mX2ZWwnUC5TfduY4=; b=HkgXxOsLy+jx+ZupovgPvDxRo4QRzamtiaPSwfnRh4PlMP8e2ppxYjaa38TmvwGp8s asygfuolIQvbpBkKeV4qw89KjYfRfovnYYaLiNamQyMePatZDrUfuvT4UVvbMBPDedIC G0FJ3IndPGvVU33pfZZulNGfx26XCLSlHKuuFEgTU18dnUi/Hiili57/bvFf+Mek25rS 6KdRx0vLZUu+NLeuH2O7p9DFSS3QfaXbXfpVNgxTd9b+VPVVpcZPcJepjs6uMg0s50wW w4mjVFBRCHmBjUHdaAfFYsDuA6e/lJLbWMpRWleCrMvwOeLEmclyPhrtdKWJUFn+6QGI TtBA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@dxuuu.xyz header.s=fm2 header.b=vDOpUjwA; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=h+rC8Uyt; arc=pass (i=1 spf=pass spfdomain=dxuuu.xyz dkim=pass dkdomain=dxuuu.xyz dkim=pass dkdomain=messagingengine.com); spf=pass (google.com: domain of linux-kernel+bounces-177973-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177973-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6341180e272si9682739a12.540.2024.05.13.11.39.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 11:39:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-177973-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=@dxuuu.xyz header.s=fm2 header.b=vDOpUjwA; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=h+rC8Uyt; arc=pass (i=1 spf=pass spfdomain=dxuuu.xyz dkim=pass dkdomain=dxuuu.xyz dkim=pass dkdomain=messagingengine.com); spf=pass (google.com: domain of linux-kernel+bounces-177973-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177973-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 4AE232828AB for ; Mon, 13 May 2024 18:39:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 82BDF3B796; Mon, 13 May 2024 18:39:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=dxuuu.xyz header.i=@dxuuu.xyz header.b="vDOpUjwA"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="h+rC8Uyt" Received: from wfhigh3-smtp.messagingengine.com (wfhigh3-smtp.messagingengine.com [64.147.123.154]) (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 965951BF2A; Mon, 13 May 2024 18:39:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.154 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715625553; cv=none; b=G2EYS3ahSy5W/2+ACrXJz5YYMLAceHqNZ0ULkNrHfUJ6Sam07kfAv+5rekahKcAbuoVyaADowVIQ9PkP3qUYHC3xlDWed4AluM2wrTrgJWkU4deGFkaGLAStf0bpCk4mRvCOzdJ/6K3Xf8aZrbsEWbz5gFwfYTgED3MtpGsxtBk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715625553; c=relaxed/simple; bh=m8R7nWxm71bMXjsYfnz7mU8geGrDX6SswEUf/Xk8bJo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=tIse9MHQUfJGSd9AK9CrA0bdDMV6l8kjO2MtKzp/0UZwFG97o+E1H765YOLIvGQl2WY8Fip0xaOR3YuO4A5M6pvGD6/C27kyn/Q38MixgIVLRGWaJsBuRZY85nKYU2W5kpJicsc/47kAs0OM8NAJCFms0GFiVVrySSCxALdzbXU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=dxuuu.xyz; spf=pass smtp.mailfrom=dxuuu.xyz; dkim=pass (2048-bit key) header.d=dxuuu.xyz header.i=@dxuuu.xyz header.b=vDOpUjwA; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=h+rC8Uyt; arc=none smtp.client-ip=64.147.123.154 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 compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfhigh.west.internal (Postfix) with ESMTP id 256A61800153; Mon, 13 May 2024 14:39:10 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 13 May 2024 14:39:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dxuuu.xyz; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to; s=fm2; t=1715625549; x=1715711949; bh=O8Ls5VMkKDiXpfxNPLZEw kjr2NHHS8FZM/mcfdqCmuk=; b=vDOpUjwAllkpPSKbfTQUQcAYV6TwWyNhBT1PT JRsmraP9ewCklKYVc7pDb4Cps0pCjw435H0PtunRQ6C/nf1a+SDA0HkVRMDQKlCk D6FePa5kzZZ+o3BKvxIRY8E20vghNuXsc6DXhzYi/9Lpc9IkmtV9GeEmGNqpgpqZ 0G0DkwKoHlQ2U+TW6LzfxhhEhDFW2bIEtAXeCLLW9q/LqmRfgGUOvPTK3AyfqvWS uj5cJUPDHQsUAn+MYFdipn68rG9AhUm4C8qY+zKYidPj+8jvfiSRVPsODotAwkWy WqDjgSSb3ysPBUpZE28xH7Xj+EEczGiw473vJW0hCV56OqYYA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1715625549; x=1715711949; bh=O8Ls5VMkKDiXpfxNPLZEwkjr2NHH S8FZM/mcfdqCmuk=; b=h+rC8UytYoJ3vCyijsSey5eYa5LBlbPSIJPTWu9ZEDXm f9wQf7H7c4iZ6MMAmjoonhin5Qlb+HTB+7yA9CXDUpQQ3Dj+st5/ack6QzhGCW9o V283bzyvlestF4QpF6QZzYmC4AUgWD+AliznidLBST8tPr/a2sgO0lV5Bdw+21Nn BGETNQuGRfUWd5WuJy5u3l2xvZgR2XV10DOaCsQch4PoOweROI//ldT4reOHmDmw jilKSPD1SbUSFUzA7naRwQxDLr0nvm9p0GP6mEXhLLq4w9ehHsWqpv2lGHxz5GXV pNfmvYHiFzMWgOxMl0k690OdpbKwNpRdVGqUdZ2baA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdeggedguddviecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecufghrlhcuvffnffculdejtddmnecujfgurhephf fvvefufffkofgggfestdekredtredttdenucfhrhhomhepffgrnhhivghlucgiuhcuoegu gihusegugihuuhhurdighiiiqeenucggtffrrghtthgvrhhnpedvgefgtefgleehhfeufe ekuddvgfeuvdfhgeeljeduudfffffgteeuudeiieekjeenucevlhhushhtvghrufhiiigv pedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegugihusegugihuuhhurdighiii X-ME-Proxy: Feedback-ID: i6a694271:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 13 May 2024 14:39:08 -0400 (EDT) From: Daniel Xu To: linux-kernel@vger.kernel.org, bpf@vger.kernel.org, linux-kbuild@vger.kernel.org, andrii@kernel.org, olsajiri@gmail.com, quentin@isovalent.com, alan.maguire@oracle.com, acme@kernel.org, eddyz87@gmail.com Cc: kernel-team@meta.com Subject: [PATCH bpf-next v3 0/2] bpf: bpftool: Support dumping kfunc prototypes from BTF Date: Mon, 13 May 2024 12:38:57 -0600 Message-ID: X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This patchset enables both detecting as well as dumping compilable prototypes for kfuncs. Users will be able to look at BTF inside vmlinux (or modules) and check if the kfunc they want is available. For developer convenience, we also support dumping kfunc prototypes from bpftool. === Changelog === From v2: * Update Makefile.btf with pahole flag * More error checking * Output formatting changes * Drop already-merged commit From v1: * Add __weak annotation * Use btf_dump for kfunc prototypes * Update kernel bpf_rdonly_cast() signature Daniel Xu (2): kbuild: bpf: Tell pahole to DECL_TAG kfuncs bpftool: Support dumping kfunc prototypes from BTF scripts/Makefile.btf | 2 +- tools/bpf/bpftool/btf.c | 54 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 1 deletion(-) -- 2.44.0