Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp819929rdb; Sat, 6 Jan 2024 10:25:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IEsL1izeYLOaDM4aYJU9GZpA/Uf9hr1Pd+/RFplzzSU+B96qu47o1b7bXabKT0GGXcjdIxi X-Received: by 2002:a17:902:b70b:b0:1d4:b4a8:d3b0 with SMTP id d11-20020a170902b70b00b001d4b4a8d3b0mr1360597pls.85.1704565539420; Sat, 06 Jan 2024 10:25:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704565539; cv=none; d=google.com; s=arc-20160816; b=Z/PS4vJCLok1i8dGm6ljeAcZhFqmK5zIF1rAXKSqBIUe7AeG7cLRpFJCZ9+Kiy34FD IBGTHoKktBVeC544MwO3Yery9km7NgzCA0cTxYzFWQPpKF/z1WbIVhTfPQnLpybi2WFm EgAUZhqwcwpC70Z3Rze8yuEGFIScteOjVdlr+S1aPB95CztzwjFdawNpxAjQKH4Yf0u/ FmKN04eBrvC0Ea4QDgcfBTr5PKMa+EaKxO/Nvy1L006RC2fvSlETlvuPCwLWwyIgmePh 9VsuAG5qaIgrnBMDzSDTW7o7yk+w334EVGZcp7IS9vcC5UtcnlB62Xff1AxF57kfWtVS EZCQ== 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=IVCGZ75Ua7FCFN20ntm4jreBBImEAAQ1ZgZeK7PHj2g=; b=x5XpZxUDx3ZHjTi+EjpGKh4Txw9yrblqIB4fVMNUDo9uxeqf+iFe5crPLlYMY/4ut7 O9sZVbnUXLVvsocVny1wlEH1H8/azi6XRgHpfdkTJGkgGyaxrdulR577HPpyxhD+v91h YishZJsoFT9hlIL5VDlt8jppQg7IHT+GyfrNtjFzwhyZuVbMfRaylfEnWZNu1zGepIuc SPxz6cz6XxntImcMVPpNPFYmVJ+uzBBc9Q9G8lpIZ6wgXBRmBae2ja6jhcvSOpf5zvGP vPiLBs2k8r/AYS8iiMAlxk1HYR/fgR36naJPEJXfaxo4w7nwJ0T1bN303qP5sA8xsuVN TDuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dxuuu.xyz header.s=fm1 header.b=PMr0g2QQ; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=YEHFRnLf; spf=pass (google.com: domain of linux-kernel+bounces-18690-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18690-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id k7-20020a17090a658700b0028c04da58a4si2811774pjj.126.2024.01.06.10.25.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Jan 2024 10:25:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-18690-linux.lists.archive=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=PMr0g2QQ; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=YEHFRnLf; spf=pass (google.com: domain of linux-kernel+bounces-18690-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18690-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 EC383283572 for ; Sat, 6 Jan 2024 18:25:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 63C25101D0; Sat, 6 Jan 2024 18:24:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=dxuuu.xyz header.i=@dxuuu.xyz header.b="PMr0g2QQ"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="YEHFRnLf" X-Original-To: linux-kernel@vger.kernel.org Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (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 0C0B0F4E9; Sat, 6 Jan 2024 18:24:53 +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 compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 2BA315C01F1; Sat, 6 Jan 2024 13:24:53 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sat, 06 Jan 2024 13:24:53 -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=1704565493; x= 1704651893; bh=yfhXIxG8TA40O/qvhvNFsNuSdtfXRKkNfeMaQtlqMLY=; b=P Mr0g2QQnTCnVlanyOnSiUaRQhqoq6LF0h/nlKzKMF3TlVYQoU2knajCdNcDJGHWV pUecyRf+x229sY0qW1KKGi1pTfH2kdLO0GL9HeG+pwZHr4lWc9vxsjYj/kT+NmHr PmFfCLIE017pkXJwiazCNZ7rpQUiBx9KV/tXNAtLedK8982qW4WqMjZezkRN1daA 6vNenza2eckuHgaPPK71fNWLEVcFDM+JA5LiHefwhtz1q7ixo8Bh7FoUYFfbHYI6 bSmsDfPfCgog55JV5ETAbREmeP63ZNk83c6dUWKKI0JrHS8bHfGtDraUNpCnlHUY L8InWceaUzgFCacYpndJw== 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=1704565493; x= 1704651893; bh=yfhXIxG8TA40O/qvhvNFsNuSdtfXRKkNfeMaQtlqMLY=; b=Y EHFRnLf7H8WMQgUhXkR5cQGJVlbRTDusYtAPSTEb3ZDbHHwR6gJIiUA8XOVlBnlN REj6EjfQ3t7jk6oBBzNN26aFFcb+TN8Y9bFVa9ajl+2jGIZJ8rxK5K1jeVVYJvTL Rqjuiy5E60Eg74WN5Nd5MzIIeyhuKeIANxjnIP2xi7i58jz/hUbNx2JBB1AtNxJ2 LGKmoJ+Ll3bi0eBtXHMB0PwFcO0oeX82aQHCF305I6SQbnuTLWJcm0WDaQNDTK2M UJCog9funGnkKdWTSQ/RYpvOXt8OMZ4qOZmpxjWDwMruAnGSFkWPEOLwlbS8jfbc SpMl0vFWhtSyuSxsHbiBA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdehuddguddutdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecufghrlhcuvffnffculdejtddmnecujfgurhephf fvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepffgrnhhivghlucgiuhcu oegugihusegugihuuhhurdighiiiqeenucggtffrrghtthgvrhhnpefgfefggeejhfduie ekvdeuteffleeifeeuvdfhheejleejjeekgfffgefhtddtteenucevlhhushhtvghrufhi iigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegugihusegugihuuhhurdighiii X-ME-Proxy: Feedback-ID: i6a694271:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 6 Jan 2024 13:24:51 -0500 (EST) From: Daniel Xu To: andrii@kernel.org, ast@kernel.org, daniel@iogearbox.net, martin.lau@linux.dev, 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 v3 2/3] bpf: btf: Add BTF_KFUNCS_START/END macro pair Date: Sat, 6 Jan 2024 11:24:09 -0700 Message-ID: X-Mailer: git-send-email 2.42.1 In-Reply-To: References: 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 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 --- 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 */ -- 2.42.1