From patchwork Thu Jun 13 16:19:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Xu X-Patchwork-Id: 13697113 X-Patchwork-Delegate: bpf@iogearbox.net Received: from fout8-smtp.messagingengine.com (fout8-smtp.messagingengine.com [103.168.172.151]) (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 47C281448E6; Thu, 13 Jun 2024 16:19:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.151 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718295593; cv=none; b=cFq3QRyjL9aaW9ftLW8qmgg0+VeyJuJSAPPCPMHzEkNwhojCX7Uhj6USDW5NS7qqEk7JotOJC+xP/6RncPc+JpqXDQ/qxfD7Gy4sPpJEFHrwu6lAGWrfV6gI+wtCxyK9VGnRpaDXrGeEds6LVT0x9JmL4qk+Kst3uSmWu8e/PO8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718295593; c=relaxed/simple; bh=upXHV4oSRlEoQNOh73uNw2LAWv/ZoKJCVki8oZkxnq4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YZXxnsWs3XaPPE3XkZHCFgIP1YlnFzMuWR46HwcXmHltCcll/PJDXJJjDIDYGG/Qdqm0+Eq8gAeV4eU2lnVr/UK7sNin1Prb16zdEb/7TPtYCoIv2J0HboT3J0ZcqCPoSG/jETAi5kCFTsH7+MjPVL/DnrrCZXL/9eZPyh+Iya8= 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=DIIV2bJi; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=gPzk3gg7; arc=none smtp.client-ip=103.168.172.151 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=dxuuu.xyz header.i=@dxuuu.xyz header.b="DIIV2bJi"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="gPzk3gg7" Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfout.nyi.internal (Postfix) with ESMTP id 6E47113800D9; Thu, 13 Jun 2024 12:19:50 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 13 Jun 2024 12:19:50 -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:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm3; t=1718295590; x= 1718381990; bh=dev3LyBB1QLwwxaaVCINRbSVtifMTpHyZ9F3Ei0utb0=; b=D IIV2bJitxaqPwH6xuUz4N5LcPUvuj8NqCKNs4ADz78kGkdeNEAYy2Nq3AsP3yGI0 LaVjPT1ayctsWf+Vmpo9tb3ysG8TrcXIcl4GfJC2vJ0BCAdgqDC1jnpjkmZ6x+cv mHTWEqczgoQ9gldT6z+HUkYbsnqEpNXk8DG1RHs5AHOQywxIuYHcwb6qw3Zp00FJ 9jdZR7vy4e0OVPsibY8upUcmB8TKYyHZCBUlxgmkvcmnwhJgFlX+CSglTmhlm/LK vfRY74q05/+hqYZg4FIpu1uf43NYFZMO7UdhDTXlY5PQKBYRROkG9ytUBa/0Z4Vr fKAUD1zUeqjeA7GsBMBIw== 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=fm1; t=1718295590; x= 1718381990; bh=dev3LyBB1QLwwxaaVCINRbSVtifMTpHyZ9F3Ei0utb0=; b=g Pzk3gg7SHlNUkiookjqzQ/FhT3wETd5+tBjhnITvSWJOTRg7slZQ/0vXYQpd9jry Ut2+l3amJruEGC96GeJXRIwzt8owdUwkOMWtMIznxtmKOQQvl0HncnYu9eTsy2e0 pJkXFjt10POk4hrb+7DYJIHnFM19BbSxUPLi/w5phQhaI6drNa0YE6DITPLaWd1C 3Ig00yPPaaRHiSUUBqxCOyeyqF/jFYA0Jgk9xgn9Z34tDGNHOY8iz6Hz5NRryZu1 gAnWV/rXqrrmPEybTlTQLCisPdsWhbJ0T/dXE+iXcLQBkhorSLSMp6ykmZrWbRVs gIAGRzT2Sd00wxVOqqdxw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedujedgleeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdljedtmdenucfjughrpefhvf evufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeffrghnihgvlhcuighuuceo ugiguhesugiguhhuuhdrgiihiieqnecuggftrfgrthhtvghrnhepgfefgfegjefhudeike dvueetffelieefuedvhfehjeeljeejkefgffeghfdttdetnecuvehluhhsthgvrhfuihii vgeptdenucfrrghrrghmpehmrghilhhfrhhomhepugiguhesugiguhhuuhdrgiihii X-ME-Proxy: Feedback-ID: i6a694271:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 13 Jun 2024 12:19:49 -0400 (EDT) From: Daniel Xu To: daniel@iogearbox.net, andrii@kernel.org, dxu@dxuuu.xyz, ast@kernel.org Cc: martin.lau@linux.dev, eddyz87@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, sfr@canb.auug.org.aukernel-team@meta.com Subject: [PATCH bpf-next 1/2] bpf: Fix bpf_dynptr documentation comments Date: Thu, 13 Jun 2024 10:19:25 -0600 Message-ID: X-Mailer: git-send-email 2.44.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: bpf@iogearbox.net The function argument names were changed but the doc comment was not. Fix htmldocs build warning by updating doc comments. Fixes: cce4c40b9606 ("bpf: treewide: Align kfunc signatures to prog point-of-view") Signed-off-by: Daniel Xu --- kernel/bpf/helpers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/bpf/helpers.c b/kernel/bpf/helpers.c index 3ac521c48bba..229396172026 100644 --- a/kernel/bpf/helpers.c +++ b/kernel/bpf/helpers.c @@ -2433,7 +2433,7 @@ __bpf_kfunc struct task_struct *bpf_task_from_pid(s32 pid) /** * bpf_dynptr_slice() - Obtain a read-only pointer to the dynptr data. - * @ptr: The dynptr whose data slice to retrieve + * @p: The dynptr whose data slice to retrieve * @offset: Offset into the dynptr * @buffer__opt: User-provided buffer to copy contents into. May be NULL * @buffer__szk: Size (in bytes) of the buffer if present. This is the @@ -2504,7 +2504,7 @@ __bpf_kfunc void *bpf_dynptr_slice(const struct bpf_dynptr *p, u32 offset, /** * bpf_dynptr_slice_rdwr() - Obtain a writable pointer to the dynptr data. - * @ptr: The dynptr whose data slice to retrieve + * @p: The dynptr whose data slice to retrieve * @offset: Offset into the dynptr * @buffer__opt: User-provided buffer to copy contents into. May be NULL * @buffer__szk: Size (in bytes) of the buffer if present. This is the From patchwork Thu Jun 13 16:19:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Xu X-Patchwork-Id: 13697114 X-Patchwork-Delegate: bpf@iogearbox.net Received: from flow2-smtp.messagingengine.com (flow2-smtp.messagingengine.com [103.168.172.137]) (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 505E6145B34; Thu, 13 Jun 2024 16:19:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.137 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718295594; cv=none; b=ns/iAVPaT+LnY3Yy+MoPaouIg2BHZ4O9aHWxF5m9IuKfCQA3yIYoHdmiSYTwSJKQ4qPJNYu206NsuAznMzP1zcGIwQaqBR0gnKLAFp6PuUg1FSvkHeg6vzPxxCKPcvzQjLig0cWRXIOhLwD02GyqNEwfTvJhExUR2vKwP3WSNGA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718295594; c=relaxed/simple; bh=d3SufosQ8LT0bZ8SGHYXs1ztJ5ewWIW0QjqdtzH28Jk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=m0M9U12lshMO1Br8DdwG9wA6EAE9UPuKGnStfyXu0ZoKGC3geUnN0GO2ibyMzD/1ctTG87SyPvI7RPp5dI0Tp02yL5GwDfflRBsi3W0MRI5i+W3Wx3QdoF1Ung+EVa9uzoPwXM5sJjYiT1DkgXp4MmKeJr39QUFgxsNzR/25VKw= 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=AuHSE0wX; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=Z7KN7GMd; arc=none smtp.client-ip=103.168.172.137 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=dxuuu.xyz header.i=@dxuuu.xyz header.b="AuHSE0wX"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="Z7KN7GMd" Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailflow.nyi.internal (Postfix) with ESMTP id 5029720025B; Thu, 13 Jun 2024 12:19:52 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 13 Jun 2024 12:19:52 -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:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm3; t=1718295592; x= 1718302792; bh=VXllBy0OPIEM37txsmqZHMLIf8msa/NYcue55B8lNbE=; b=A uHSE0wXiX7haWc1A6vaFcNkyAjimPaYSf53X0tie9Y275Rz0d5Nx10awqhxJmzwo DxKbag8tNUHdGZem1IoaDe4mtPncOJOdhbNbD3bh0Cge6NUw2e0Di+OD0ACX7uv+ f84k1tubNdkX5tC5tjxWBPg7sIx+kPNFUmt5PX33XhMBKqBxUIye0QhqNcAl82mn R90uCtDg7hbSt2IYwW0+9q9qFjazKieOPjZ+plO9KDtXPTG9snXpTpcK53wGbWr4 eJqrKJbjW86AY4mZkd4hJbcnZIwIMepZkJCsrDmxvmt1rQgkV40YZUuCAi+YksRW yPs/KOH+U0dERGZCjNwPQ== 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=fm1; t=1718295592; x= 1718302792; bh=VXllBy0OPIEM37txsmqZHMLIf8msa/NYcue55B8lNbE=; b=Z 7KN7GMdgJzoqn7hDkLHdIbni4eqPA/T8LvJRFaP2iFOTwYTgZ1CnwkIbc2f8Efhb nyE7PEoG7leOoc5PlLlB0sbf4QipU/X7GGlvWeMAE/7rQNpronxznL3vvpiXDW0J 04uTIhVyltrgWxQoBmMa8r/30z1Ik/RCSP+Nh/WhOJJyF08sl/+y7pJYqiy7R9pZ DETsLd61HoM8hv18wKOD73YkulU6xWFJf4IRQUsSw9qPOXW+9xIiz1pOXNIcrTHz AjOdHKi3YbY3eQbvXOJBIWJgrBFHgOscde63jSJGmEaMtxkBBTyvgYOsPubsMvhn 7Hx7YAzXtonMi6LmKC6ow== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedujedgleejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdlvdefmdenucfjughrpefhvf evufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeffrghnihgvlhcuighuuceo ugiguhesugiguhhuuhdrgiihiieqnecuggftrfgrthhtvghrnhepleeiudehhfetffeiud dtjefguddtkeduleeuleevkeejiedtfeeuuedtleehvdefnecuffhomhgrihhnpehkvghr nhgvlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpegugihusegugihuuhhurdighiii X-ME-Proxy: Feedback-ID: i6a694271:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 13 Jun 2024 12:19:50 -0400 (EDT) From: Daniel Xu To: daniel@iogearbox.net, andrii@kernel.org, shuah@kernel.org, ast@kernel.org, nathan@kernel.org, dxu@dxuuu.xyz, eddyz87@gmail.com Cc: martin.lau@linux.dev, song@kernel.org, yonghong.song@linux.dev, john.fastabend@gmail.com, kpsingh@kernel.org, sdf@google.com, haoluo@google.com, jolsa@kernel.org, mykolal@fb.com, ndesaulniers@google.com, morbo@google.com, justinstitt@google.com, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, sfr@canb.auug.org.aukernel-team@meta.com, kernel test robot Subject: [PATCH bpf-next 2/2] bpf: selftests: Do not use generated kfunc prototypes for arena progs Date: Thu, 13 Jun 2024 10:19:26 -0600 Message-ID: X-Mailer: git-send-email 2.44.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: bpf@iogearbox.net When selftests are built with a new enough clang, the arena selftests opt-in to use LLVM address_space attribute annotations for arena pointers. These annotations are not emitted by kfunc prototype generation. This causes compilation errors when clang sees conflicting prototypes. Fix by opting arena selftests out of using generated kfunc prototypes. Fixes: 770abbb5a25a ("bpftool: Support dumping kfunc prototypes from BTF") Reported-by: kernel test robot Closes: https://lore.kernel.org/r/202406131810.c1B8hTm8-lkp@intel.com/ Signed-off-by: Daniel Xu --- tools/testing/selftests/bpf/progs/arena_htab.c | 1 + tools/testing/selftests/bpf/progs/arena_list.c | 1 + tools/testing/selftests/bpf/progs/verifier_arena.c | 1 + tools/testing/selftests/bpf/progs/verifier_arena_large.c | 1 + 4 files changed, 4 insertions(+) diff --git a/tools/testing/selftests/bpf/progs/arena_htab.c b/tools/testing/selftests/bpf/progs/arena_htab.c index 1e6ac187a6a0..cf938cf8c11e 100644 --- a/tools/testing/selftests/bpf/progs/arena_htab.c +++ b/tools/testing/selftests/bpf/progs/arena_htab.c @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright (c) 2024 Meta Platforms, Inc. and affiliates. */ +#define BPF_NO_KFUNC_PROTOTYPES #include #include #include diff --git a/tools/testing/selftests/bpf/progs/arena_list.c b/tools/testing/selftests/bpf/progs/arena_list.c index 93bd0600eba0..3a2ddcacbea6 100644 --- a/tools/testing/selftests/bpf/progs/arena_list.c +++ b/tools/testing/selftests/bpf/progs/arena_list.c @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright (c) 2024 Meta Platforms, Inc. and affiliates. */ +#define BPF_NO_KFUNC_PROTOTYPES #include #include #include diff --git a/tools/testing/selftests/bpf/progs/verifier_arena.c b/tools/testing/selftests/bpf/progs/verifier_arena.c index 93144ae6df74..67509c5d3982 100644 --- a/tools/testing/selftests/bpf/progs/verifier_arena.c +++ b/tools/testing/selftests/bpf/progs/verifier_arena.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright (c) 2024 Meta Platforms, Inc. and affiliates. */ +#define BPF_NO_KFUNC_PROTOTYPES #include #include #include diff --git a/tools/testing/selftests/bpf/progs/verifier_arena_large.c b/tools/testing/selftests/bpf/progs/verifier_arena_large.c index ef66ea460264..6065f862d964 100644 --- a/tools/testing/selftests/bpf/progs/verifier_arena_large.c +++ b/tools/testing/selftests/bpf/progs/verifier_arena_large.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright (c) 2024 Meta Platforms, Inc. and affiliates. */ +#define BPF_NO_KFUNC_PROTOTYPES #include #include #include