Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp181531rdh; Tue, 13 Feb 2024 13:23:14 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW6H3r8+yX84O+DEEfxfXELX6vYJMcOBl4woxc1gOJqlmCw9Ec3u5YCgBrtSgsaE5Ft6vUmpBuu5WcSTgsKD8rRcxqBYYUiOlenZU9cKg== X-Google-Smtp-Source: AGHT+IE+6Q6hRC3roG3Z692x8dH0A+au4AD/MdasziQE/D8hONrrgKVRN7bQPozb1fheF386BO5G X-Received: by 2002:a17:906:34cc:b0:a3c:f73e:7829 with SMTP id h12-20020a17090634cc00b00a3cf73e7829mr356005ejb.65.1707859394402; Tue, 13 Feb 2024 13:23:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707859394; cv=pass; d=google.com; s=arc-20160816; b=t/1PMts3C5mgtia5w5PI5jbqKmNTebo/wu7L9y0L60fdG2XHlALprcZzNsCIK+vmmZ I8/AXRwYmQ4Ad39n7cL9OevM2V9Ys1lnDwhFshvqxdA2V1iRdCUoOIUTN2FZSEMAJnoa 9Dg1Mk+SIpa2hx9FJ6lCYLobJNNiT6MuxZrAdZzn0lW1qP4cDDx+99uLQVkl2ZuElK3m Hu7JMdksm0ZzURkS06fjGrwb7Y5VWHbP18MjoJ6mpvc/OMFHnZAVcYosvVWnbDIHV5lp x5Gh4L2zOMbotdjhy2LUKY0hsDW615rxXtAiWMRXkC2qlTgaifIuTt6EmEKRNHfwBswO GhBA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding: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=+SBciZiT6vEzM12Yvi5B9bmxj/6Jh0lugT098mnxOwU=; fh=z9fIqqUnT7nqCSrmZf0cINbFe7jotKzCtD9DIYeJ2B0=; b=MyM5pxGUAcKnj3gDrM6nyjn09C/fCLZz4axCwBjy2UIv3kntx9JQdyYCy3KE3VIdJ4 QmnMJEWrw1ua5K20uV8cR5HbuJnkk50gev8Z+7BktseEIjU8FH7kwSwFl945MKmD27Lc X5BGhkVkEfDV75kU5jktxtdkIqsC2F/+xxqbbCFWO1D4xp2OKk6uO7IXMcHpSIW/Uq3Z GlwDZYe275m0EAoiml+gOqkQJWxL7+R9PpMMnnQlDk6I2w0OrGZ0AJoUeyhC9vwuTF7x C3tFdx7W+LauTeHluvRmupgacfQA9G7UtYcCt5ETYU17rxt2Lydnm6xDb70V1h39f8Cw OzZg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@dxuuu.xyz header.s=fm2 header.b="h/FZeJqm"; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=GysW0BV4; 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-64318-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64318-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCXNPAapAj2kyT5GJWZ+6w6AJi6ypQoCTqehcz9mmpeiLrN8Zd1McGoqv35wbDjAQFbbMLP0ACJd8UIw3KLwMCqBGKFzD2erJPZ/Lw12VA== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id d18-20020a170906041200b00a396c26cb08si1586728eja.64.2024.02.13.13.23.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 13:23:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64318-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@dxuuu.xyz header.s=fm2 header.b="h/FZeJqm"; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=GysW0BV4; 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-64318-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64318-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 29BD91F26622 for ; Tue, 13 Feb 2024 21:23:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0A08261680; Tue, 13 Feb 2024 21:09:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=dxuuu.xyz header.i=@dxuuu.xyz header.b="h/FZeJqm"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="GysW0BV4" Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (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 897A66166D; Tue, 13 Feb 2024 21:08:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=66.111.4.29 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707858539; cv=none; b=MkdtiivCvl3YLrLqnIbiSzgdoDR3D+kOCZOqfCuNF8fa+n365AlVudbdc4LJlVFcDsRN0v0oqKaX0PcxZfA+LJVkGBxjKKe+bHOuhsK52c2kOZuUZqTTwPSNaA5gbmBVd5TFvHZArjfY6R0ROPPzWYZCLfF6D2rbzoU3vbuXJ2s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707858539; c=relaxed/simple; bh=ng462qQizCjYYSN6BAOfse1PoLyEhBQpuqEkECNoHv0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VjT6QdPJyEgYklMXCgr1zv70mWoL96KfyAOE7CsEOiEwp7zt1xEaFW/WVUadpI4hOatZiI3Hz++VWyiQ018IyqQJrSZq8uap0nrdoXLYucy/aLuTlK8l+mW3gQVB1QGU4/wpI02ezTPtk9l/ZFh+fvCfdTtGBLHE3ERAaKoxhfs= 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=h/FZeJqm; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=GysW0BV4; arc=none smtp.client-ip=66.111.4.29 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 74ABE5C00E0; Tue, 13 Feb 2024 16:08:56 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 13 Feb 2024 16:08:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dxuuu.xyz; 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:subject:subject:to:to; s=fm2; t=1707858536; x=1707944936; bh=+SBciZiT6vEzM12Yvi5B9bmxj/6Jh0lugT098mnxOwU=; b= h/FZeJqmk82sHAe/NfujKJf8cE5OCLjqPEx6i7kbDNGDcjBX2a8wf3V+hwAVehzW d6BImC3+cjmfJpTMru5MgcNBr0lHpwQ8RFonBaquyTnJ40/IXAmz14Ja6KcTowhd /yp0wBuRfyXy6m9JU7PQvVHPCRzVcjwXZ6n0AC3uipFdMFaXlsMycHs6t7GC/Q9q t7rxxNfFuML6eFVJociEDDu3cEEQU8YMQx2FfcTc4ACqaClNQnfWk1NGvPFA/Gj+ eJkPeT9+i5LsHdnJQbqruyKGaj80+UbzEUKOlyYOcizUb0ORgq6wHg9iAUtBnQQo VIhr8IJ988A+OQRppTh8Ew== 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:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1707858536; x= 1707944936; bh=+SBciZiT6vEzM12Yvi5B9bmxj/6Jh0lugT098mnxOwU=; b=G ysW0BV4R36wOEy3h5UdzylXppNBOo2Bnf/JJTjDIn+h4Kmm66qVL1q+ss4sTTIpa X0KIYUpm7fpjT/KVId5HRT05ktCTaQpvyBgVjbtywFS8dPwB1RwRBBjf5d7r/etx q+0NxXvFV07d+M/ieTuKqUmoPe9mMPMhd9zp96TGSYl6cLhDVaBIQvza+vokL+Fc gkLG6HJA9KYfYi0twsVBhAXrIpTmmEEfUXxfqhkPSQdaWFBv4rqGow1vJB6EnXJu NzdgRDJibTGkqJhOJAmGWP/dw/4sSaPRxkjwzPHzU0jkFaCSbnEO1HYT40fvNeAv ajbEm2LN9gJWBpPJP6C3w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudehgddugeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdlfeehmdenucfjughrpeffhffvvefukfhfgggtugfgjgestheksfdt tddtjeenucfhrhhomhepffgrnhhivghlucgiuhcuoegugihusegugihuuhhurdighiiiqe enucggtffrrghtthgvrhhnpedvuddvudeiteefjeegheeuudfhgefhkeekteeulefggeev heevieekffffiedvtdenucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepugiguhesugiguhhuuhdr giihii X-ME-Proxy: Feedback-ID: i6a694271:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 13 Feb 2024 16:08:55 -0500 (EST) Date: Tue, 13 Feb 2024 14:08:54 -0700 From: Daniel Xu To: Andrii Nakryiko Cc: bpf@vger.kernel.org, linux-kernel@vger.kernel.org, andrii@kernel.org, olsajiri@gmail.com, quentin@isovalent.com, alan.maguire@oracle.com Subject: Re: [PATCH bpf-next v2 0/2] bpf, bpftool: Support dumping kfunc prototypes from BTF 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Tue, Feb 13, 2024 at 11:09:29AM -0800, Andrii Nakryiko wrote: > On Sun, Feb 4, 2024 at 1:06 PM Daniel Xu wrote: > > > > This patchset enables dumping kfunc prototypes from bpftool. This is > > useful b/c with this patchset, end users will no longer have to manually > > define kfunc prototypes. For the kernel tree, this also means we can > > drop kfunc prototypes from: > > > > tools/testing/selftests/bpf/bpf_kfuncs.h > > tools/testing/selftests/bpf/bpf_experimental.h > > > > Example usage: > > > > $ make PAHOLE=/home/dxu/dev/pahole/build/pahole -j30 vmlinux > > > > $ ./tools/bpf/bpftool/bpftool btf dump file ./vmlinux format c | rg "__ksym;" | head -3 > > extern void cgroup_rstat_updated(struct cgroup *cgrp, int cpu) __weak __ksym; > > extern void cgroup_rstat_flush(struct cgroup *cgrp) __weak __ksym; > > extern struct bpf_key *bpf_lookup_user_key(u32 serial, u64 flags) __weak __ksym; > > > > Note that this patchset is only effective after the enabling pahole [0] > > change is merged and the resulting feature enabled with > > --btf_features=decl_tag_kfuncs. > > > > [0]: https://lore.kernel.org/bpf/cover.1707071969.git.dxu@dxuuu.xyz/ > > > > === Changelog === > > > > From v1: > > * Add __weak annotation > > * Use btf_dump for kfunc prototypes > > * Update kernel bpf_rdonly_cast() signature > > > > Daniel Xu (2): > > bpf: Have bpf_rdonly_cast() take a const pointer > > bpftool: Support dumping kfunc prototypes from BTF > > I've applied patch #1 as it's a good change regardless. Please send v2 > for patch #2. Ack. Been a bit busy recently - will probably have time to work on this again next weekend.