Message ID | 4b40c9ebeeed8638150259090b3ce15f5aae6597.1704422454.git.dxu@dxuuu.xyz |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-17434-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp5990956dyb; Thu, 4 Jan 2024 18:47:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IGWEzUgwAu9IQAwHOJrPr4krfyCUsEOmThufzLdFsw3PCHULh7sLYKXnYMZWz3fJtqbu/QY X-Received: by 2002:a05:6a00:1c81:b0:6d9:f3b5:5cd6 with SMTP id y1-20020a056a001c8100b006d9f3b55cd6mr1717388pfw.59.1704422830497; Thu, 04 Jan 2024 18:47:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704422830; cv=none; d=google.com; s=arc-20160816; b=HaXz7jfaDH4uAefii9B9GSE+QJfikIQgL7RbNiYnOcRgF0TMw7SJ7VfWMiOiwGAsX3 WvwqLNCp7TE+xvRWpziSJzxPguQibxNwNHF+h4scZxb13kdLft1QjDPyZxO3VjDIjgja z5H3V8/bWxvTeiy6oypua95/Bl+kwUc4CzO1NrSYX/VpTDaD6uNBrOyGcR0vTHwgcItQ ycdsJfLQrf0tsrQzZwzSPlpKrgQdcUdM6hQxkxMt4hUsptoAfQ9eSpmB1JHeUe0m6y9U SyVn28dNKzPJX4hYRH8I4B5kdj6iW34CyqfRD2GRxWMPDaAMgwL0cL5/fbtrZuJ44eJm agvQ== ARC-Message-Signature: i=1; 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:references:in-reply-to:message-id :date:subject:cc:to:from:feedback-id:dkim-signature:dkim-signature; bh=yfhXIxG8TA40O/qvhvNFsNuSdtfXRKkNfeMaQtlqMLY=; fh=xLAZerEvAK6EzMXZEzB215DZ6mnFlGaQNMg2EFepO7o=; b=ocSoohnJaYvvLqKNp5z/y279/HDcWb0IiaggoP2r8qtH1DApHw3921uqHDqXSki6r8 6NLsxJ3Wcbg0Df1CpJr6Tw5DUEV4jowr1iUVXMw3Orr+flpuscMjMV2RJ1njFaW7dgxD l8za06mTQ+AszTfdgkC/OMJ7zzuFtxBehtnQ8ZDcY772t9RHY/DZ71crb4pxPjmPkjfs N+DF1Kg/M378ezIBD/2xD/YIbIrQtjWso1ZK9EYX8kDYzXotUVefRlG8waGkP5yADrAy ktLRnbFEneJ9UGuzunJ3CqvWgB5OfC0Te1Um2aMQ9JoS7JmjdVPCnnasFyItcWFZTcZJ xp8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dxuuu.xyz header.s=fm1 header.b=d8GMEAWz; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=2Djwj+md; spf=pass (google.com: domain of linux-kernel+bounces-17434-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17434-ouuuleilei=gmail.com@vger.kernel.org" Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id p36-20020a056a000a2400b006d09859390bsi536370pfh.16.2024.01.04.18.47.10 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 18:47:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-17434-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@dxuuu.xyz header.s=fm1 header.b=d8GMEAWz; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=2Djwj+md; spf=pass (google.com: domain of linux-kernel+bounces-17434-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17434-ouuuleilei=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 390862873F5 for <ouuuleilei@gmail.com>; Fri, 5 Jan 2024 02:47:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7D5C61D688; Fri, 5 Jan 2024 02:46:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=dxuuu.xyz header.i=@dxuuu.xyz header.b="d8GMEAWz"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="2Djwj+md" X-Original-To: linux-kernel@vger.kernel.org Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) (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 142836134; Fri, 5 Jan 2024 02:46:09 +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 compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id A37173200A90; Thu, 4 Jan 2024 21:46:07 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 04 Jan 2024 21:46:09 -0500 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:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm1; t=1704422767; x= 1704509167; bh=yfhXIxG8TA40O/qvhvNFsNuSdtfXRKkNfeMaQtlqMLY=; b=d 8GMEAWzt1FCvG3X19BObWyZ5JVnkQJATxEyCw0CV8wmAI5KLC2/6PCuqgy0PH2ns hrZfYi7w9A/XBy87Bd1vBrPDpnMj7NNugAfbloY3v6aRB0XUw/pWUdh7G/ccu9II E5sgMGHKNOMLyjGeARKWnyq5OV9sMJ/6jroDHva86VVLLRAE9SK/o/EJFp6ogdNp buH+xHAl8wFmIQcB7jVrbKVSFUiIkxmWtRztSATsFVbhMcso9KY6XaNWPhqX/CMj ZQ1DGBo5B18ru0sEyCM5o9wc6+8o0lJ2NYtA9wRbP9MwiZo2ahd6aXhGvSLYJuT8 5WQCcpf222JT0xqA01vow== 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: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=1704422767; x= 1704509167; bh=yfhXIxG8TA40O/qvhvNFsNuSdtfXRKkNfeMaQtlqMLY=; b=2 Djwj+md6fzMpiiQdR/8zUvjOY6CMvYVzQGUAqG0XeMc+PBNhr0FQ/LG+6U796srd Eoq0r1+BZz5iCO3NqBzOy6W32IJlmb6zofOKTXbQdwOOS4SeWDc6wI2DizRMr9GS nPm5ZqJOPPq/lJC3BV536Z3BYImGO6zi8QrwZqF87VPwdUj8N5AmweArsdJoiTUl uZihxNHl3g7xJ1fiBt3F5tvwU4oIpMaE+bbG8O6qwtt8qoGT7wXM+qnrxDt0wyou s3ibyr5G+3E/5lTQKX7cEAEuV/LisY4LwERwRb4CxaJCQOl2ggKSvnG5VDmBlzll n+qmvTLYki7p84rLoEoUw== X-ME-Sender: <xms:b22XZd5pUdtiKIc9CS7Nl3xS7SuLqx6rLcsB-a4xJUTlJRdGlGwssQ> <xme:b22XZa6jZeshhC1qUuFlrXFiop2MM0AtWnqQis14mYx2kdyTUzZJKswHAUz88cdsn iitNibUGuZCpJAF7A> X-ME-Received: <xmr:b22XZUddHUtYDTf-ProTk13qDdiP47k8NwdCZtJMFfz7jJv8rewBFlgGfB_8gkYprHAXysRV4EFfEBZxSQTMvhsig8O202jslr15PuM1v9_nkQ> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdegkedgheduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdljedtmdenucfjughrpefhvf evufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeffrghnihgvlhcuighuuceo ugiguhesugiguhhuuhdrgiihiieqnecuggftrfgrthhtvghrnhepgfefgfegjefhudeike dvueetffelieefuedvhfehjeeljeejkefgffeghfdttdetnecuvehluhhsthgvrhfuihii vgeptdenucfrrghrrghmpehmrghilhhfrhhomhepugiguhesugiguhhuuhdrgiihii X-ME-Proxy: <xmx:b22XZWLtpTF0sHegvVoEke_yCIux8bAcA4c4a3MJQT-T-QhCNx2whw> <xmx:b22XZRLjh0W2HPPFRSr2Seffw7ps3o5Mnepkf8lFDzx23dkr_asT_g> <xmx:b22XZfx2XCIZIauxlUgvzGkfe5DUAf1hcmQoqgnA9zQIA8TrAQDrrA> <xmx:b22XZa4S9HczvX-OJ_drKkuWFiuD2Tx4caO_77bk4WVkE2XyJSC4mQ> Feedback-ID: i6a694271:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 4 Jan 2024 21:46:05 -0500 (EST) From: Daniel Xu <dxu@dxuuu.xyz> To: martin.lau@linux.dev, daniel@iogearbox.net, ast@kernel.org, andrii@kernel.org, alexei.starovoitov@gmail.com, olsajiri@gmail.com, quentin@isovalent.com, alan.maguire@oracle.com, memxor@gmail.com Cc: song@kernel.org, yonghong.song@linux.dev, john.fastabend@gmail.com, kpsingh@kernel.org, sdf@google.com, haoluo@google.com, jolsa@kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH bpf-next v2 2/3] bpf: btf: Add BTF_KFUNCS_START/END macro pair Date: Thu, 4 Jan 2024 19:45:48 -0700 Message-ID: <4b40c9ebeeed8638150259090b3ce15f5aae6597.1704422454.git.dxu@dxuuu.xyz> X-Mailer: git-send-email 2.42.1 In-Reply-To: <cover.1704422454.git.dxu@dxuuu.xyz> References: <cover.1704422454.git.dxu@dxuuu.xyz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787216873482804413 X-GMAIL-MSGID: 1787216873482804413 |
Series |
Annotate kfuncs in .BTF_ids section
|
|
Commit Message
Daniel Xu
Jan. 5, 2024, 2:45 a.m. UTC
This macro pair is functionally equivalent to BTF_SET8_START/END, except
with BTF_SET8_KFUNCS flag set in the btf_id_set8 flags field. The next
commit will codemod all kfunc set8s to this new variant such that all
kfuncs are tagged as such in .BTF_ids section.
Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
---
include/linux/btf_ids.h | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/include/linux/btf_ids.h b/include/linux/btf_ids.h index dca09b7f21dc..0fe4f1cd1918 100644 --- a/include/linux/btf_ids.h +++ b/include/linux/btf_ids.h @@ -8,6 +8,9 @@ struct btf_id_set { u32 ids[]; }; +/* This flag implies BTF_SET8 holds kfunc(s) */ +#define BTF_SET8_KFUNCS (1 << 0) + struct btf_id_set8 { u32 cnt; u32 flags; @@ -204,6 +207,12 @@ asm( \ ".popsection; \n"); \ extern struct btf_id_set8 name; +#define BTF_KFUNCS_START(name) \ +__BTF_SET8_START(name, local, BTF_SET8_KFUNCS) + +#define BTF_KFUNCS_END(name) \ +BTF_SET8_END(name) + #else #define BTF_ID_LIST(name) static u32 __maybe_unused name[64]; @@ -218,6 +227,8 @@ extern struct btf_id_set8 name; #define BTF_SET_END(name) #define BTF_SET8_START(name) static struct btf_id_set8 __maybe_unused name = { 0 }; #define BTF_SET8_END(name) +#define BTF_KFUNCS_START(name) static struct btf_id_set8 __maybe_unused name = { 0 }; +#define BTF_KFUNCS_END(name) #endif /* CONFIG_DEBUG_INFO_BTF */