Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp1786621rdb; Mon, 8 Jan 2024 10:07:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IGf99gRraPdGkqunSSKl/eCWWSmVhkge/Gsv68TvWUv5DGvEQAN4Jcu1jj8PA71D1OYEOCS X-Received: by 2002:a05:6a00:844:b0:6d9:e6f6:707d with SMTP id q4-20020a056a00084400b006d9e6f6707dmr5081726pfk.20.1704737232784; Mon, 08 Jan 2024 10:07:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704737232; cv=none; d=google.com; s=arc-20160816; b=M73fu3Ys8+lpdT1/cSHRmNC96i7kGzXVRruSdBEFNgi4M8Uc/W+KToLlW4tDbtH+BR 8uDG9GMv7SKvFn/k/lwdH8KJQGwXq9Vj+9/tlP5rDlSo5JcxRIG/08NYnwWzckBR+a3W PtW/CajSIKTwi1AdLJxOF0EBohwraTgKuBV9rw6ZIbH5n+ZBFXQmzYaufwR2XNUC5t/W BnFiS/96TPq+2/tODeEMJ3bgWOcE9aNADU7PO901dnpBrXMDfhONZ1LODga/57zuloni fr3X/0kOc/haqCkaJWiI6pEn8rG8CZlzzWfy3WQ3tQrgeq2tYauDqGPpIiMaGUC7kRpu dxsw== ARC-Message-Signature: i=1; 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=pNIZiWpwLsHDep+0m+KAN+8thOCgoQ7cLNAuzaNkgag=; fh=YpqemKBlzv23MV9ciPUkwmJh/tBdcSqwwTyCB7InhGQ=; b=oG9EOFXcyft4wfIZEad39ONjREGiHNEfJ9fhmvImxy1AIkHRqOG85cGwrieVvLq3tq nAYFRiJny86FihZVRTM3bsMUsfXe54VJ0GYKfXhPDCc6yjbjXVO27Kt2hgTekv6z1grg aw+AMG8NXU3kw+bkLq1u5opjuJ4/hJSsR3DQTR3TsrWIiw1xhfhPapXf1XDLq4s5/vLJ YUsbx0rAtS0ur7WDPBy1VdktVEgUNa+vwxuM9p/HrjNN2z8ghF7chpCf/cY5xhmMwvSs FR2y01CLUsI5x9+7VfE0wb7aPAGEK8oaELdDqYYtP52Bsy4/G9LoYhsxFJZOuHFHfPyP +Yig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dxuuu.xyz header.s=fm1 header.b=Rx4swttZ; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=l7TL9Wfz; spf=pass (google.com: domain of linux-kernel+bounces-19929-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19929-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d17-20020a656211000000b00577e00c5ffasi162687pgv.867.2024.01.08.10.07.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 10:07:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-19929-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@dxuuu.xyz header.s=fm1 header.b=Rx4swttZ; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=l7TL9Wfz; spf=pass (google.com: domain of linux-kernel+bounces-19929-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19929-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id AFBE1B219B2 for ; Mon, 8 Jan 2024 18:07:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6537D56754; Mon, 8 Jan 2024 18:00:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=dxuuu.xyz header.i=@dxuuu.xyz header.b="Rx4swttZ"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="l7TL9Wfz" X-Original-To: linux-kernel@vger.kernel.org Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) (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 D6ED655775; Mon, 8 Jan 2024 17:59:59 +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.west.internal (Postfix) with ESMTP id 45C743200D46; Mon, 8 Jan 2024 12:59:57 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 08 Jan 2024 12:59:58 -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=fm1; t=1704736796; x=1704823196; bh=pNIZiWpwLsHDep+0m+KAN+8thOCgoQ7cLNAuzaNkgag=; b= Rx4swttZoBqP4k0C3+opoVb8qkKfsAa8lfwJ0rZMJxOsqXyjPxVdT2bsT7Z+P0OE C75X10/GaNzr7mbZ/MfxWAtd7Zdu2v2h+vwxAhOnPz+ZY4BCyV4EmwmoNo5apX6M AhlKeJRupGulf9j+pGVKLnlrjsmR2KG1SeUuDOv2Wj4jZwWy4oVTd9Dv5bP/au2Z vb3YW9wSwlb8wcb+T4qtjISJs0lV98wYzACSfmnhtX2Uq9HkB5YEwfSSih+fVzo6 Gvc0mEeCVrTtTm5nx60/4Te/WsMsLvhFQVyzLXf8SoH8w04M05wrwkQN4rdKdCxq 7yswvz+MtzPmgukyCA3K2g== 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=fm2; t=1704736796; x= 1704823196; bh=pNIZiWpwLsHDep+0m+KAN+8thOCgoQ7cLNAuzaNkgag=; b=l 7TL9WfzzkC8KTjGzrmx5twRcM+F7fNrdAWppedfCKOrUSJhgTxoZapYWYhH856J1 hAZornn23OdVyzcvX83Qf5YoTohWo13G3OII9XescaxTzhKngDxJVeK0dn8QwKuU i2kDCu+4zqEXtWxjTY0bgcKO+DqmPmdkW/jbXOtRinT/R6ZTh3FwQsANa4GYJYCB 36s9Xaeg2fqHa9HgE+DqqSH9ym8aT5qLzab/kwFlobBwiGsjHBRQDtqt5o/LSb/2 uU3m3sBfjXCRiS2cqQljDQxHVMrtDxiRODvlggeOTNjmGi2EgWpdWTsIUYBAhOK1 fdDu0dWAqat9SFWFYIqug== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdehjedguddtiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enfghrlhcuvffnffculdejtddmnecujfgurhepfffhvfevuffkfhggtggugfgjsehtkefs tddttdejnecuhfhrohhmpeffrghnihgvlhcuighuuceougiguhesugiguhhuuhdrgiihii eqnecuggftrfgrthhtvghrnheptdfgueeuueekieekgfeiueekffelteekkeekgeegffev tddvjeeuheeuueelfeetnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomhepugiguhesugiguhhuuhdrgiihii X-ME-Proxy: Feedback-ID: i6a694271:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 8 Jan 2024 12:59:54 -0500 (EST) Date: Mon, 8 Jan 2024 10:59:53 -0700 From: Daniel Xu To: Lorenz Bauer Cc: 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, 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: Re: [PATCH bpf-next v3 2/3] bpf: btf: Add BTF_KFUNCS_START/END macro pair 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 Mon, Jan 08, 2024 at 10:14:13AM +0100, Lorenz Bauer wrote: > On Sat, Jan 6, 2024 at 7:25 PM Daniel Xu wrote: > > > > 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) > > Nit: could this be an enum so that the flag is discoverable via BTF? Sure, makes sense. > Also, isn't this UAPI if pahole interprets this flag? Not sure. I guess it'd fall under same category as any of the structs the kernel lays out in .BTF_ids, like `struct btf_id_set8`. IMO it's not, as that's kinda confusing to call anything in ELF uapi. Eg I don't think people would consider layout of `.data..percpu` section uapi. Thanks, Daniel