From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796506600; b=AxDg8bc26Heb9ArVpjIrRaNtVc2nIndeu73jpN/8nMbRIamrnDbXovp3SCneVjLp/eSo 62CIJaE0erek5cQdbBB73Js1D7C9DKDrdeSg4B+zr1ahf6iZjMUkI8AW5aiIdWSxBY1EL Unwlsb7iLavw8ITcEwllxOaVJUwowHKcKZsMW7qvmvtk/PU3gQ0arlREnMk04KBvUw7j1 kULjFaw4nqXBo3cBl6M/VNipMs/3wSvdqUQYkV6W5c+3ckbe7IELwXA8/Wm1ixeuGl6xH QJYROmRSmmcFEzUKISj4cbnG4ojMwmQphT7GhnKMq4yTK3AGKVfUwbEIoR8ovHlAI9w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796506600; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=6GjU8+4GsPgLPWloIg2xlbbSwKknFJNLCUhbnKgDXDA=; b=AgeiIfuYDJ9SLAGW1IZr92Q3PzEwrgZdJOnDWmApgGUGebMf+v9ybPa5CWcCf716cnwy Tyy0p6xwO+u/GGiKSEuiaVSgVRPYQtVYj99AFrQRNrVxaO1WPo7rZdxZEAbCbabHvVhTV kbpXFJODmBdLb9INyNRsLgMFo4PqPFgVLIVbIpdkiZs8BxkFHxJWEEQvCh4b5/ZD4T624 jQgP4xs8eF4ht41lKXYYnGvdUQzeqhS+H27x9Yk+YBoUhM+hxl/+lpWDsnx4AriNm5x5g alEIQOU2Q1rdkFqrrtVDVBWhtS+WrEwrr2f4ObAVLEqtNrilZ2ka3iO9AOoIgR7q37A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=hsFCOZMK; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 862D8606A31F for ; Sat, 5 Dec 2026 21:36:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=hsFCOZMK Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1C71D1F0092B; Sat, 5 Dec 2026 21:36:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796506600; bh=6GjU8+4GsPgLPWloIg2xlbbSwKknFJNLCUhbnKgDXDA=; h=From:Subject:Reply-To:To:In-Reply-To:References:Date; b=hsFCOZMKv49rHVKSlWHdpSmySAHnb9ZstLwmgqsIutTEpEncHRqcfbbIporzFL+8/ mB9pYJKGK9/rCEUS/SOm4YfvGL/fl5zXU7FoLPznl5SNRqaYZYcTQ5Sk8zBI7ui9R2 WLAtRGQvFzTk3YN08TAgvog0OjsVY5OJPFGnSh55GU1WWCp+KiE3Fn2kValWsPjoa4 izBCApSnbcCog1VHK0dz1FRhoItFXe/TXz/uIj3/mg3SppxmWvEzmI8+hIXI/u3+us 8fI/iWsxiCHL1dCVYK13OvaoYW1XJ7WCx+pltEx6MMinxZLwHCit8vL16uDnVPm1Oz 9V7c5f4J3VaVw== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH bpf-next 2/3] libbpf: Load objects with weak typed ksyms on kernels without BTF Reply-To: sashiko-reviews@lists.linux.dev To: =?utf-8?b?R2V5c2xhbiBHcmVnw7NyaW8=?= , bpf@vger.kernel.org In-Reply-To: <20261205-libbpf-weak-typed-ksyms-no-vmlinux-btf-v1-2-77cc642f7d4b@condado.dev> References: <20261205-libbpf-weak-typed-ksyms-no-vmlinux-btf-v1-0-77cc642f7d4b@condado.dev> <20261205-libbpf-weak-typed-ksyms-no-vmlinux-btf-v1-2-77cc642f7d4b@condado.dev> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sat, 05 Dec 2026 21:36:39 +0000 X-Mailing-List: bpf@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] libbpf: newly added multi-line comments violate BPF comment style -- commit 0a6249088ebcbf60499ca895e6e10512c2579665 Author: Geyslan Greg=C3=B3rio libbpf: Load objects with weak typed ksyms on kernels without BTF This commit allows libbpf to load BPF objects whose only use of vmlinux BTF is weak typed ksyms when no usable kernel BTF is available, leaving those ksyms unresolved instead of failing with -ESRCH. > diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c > index 6fe0143ea9590..5e2bb95bda953 100644 > --- a/tools/lib/bpf/libbpf.c > +++ b/tools/lib/bpf/libbpf.c > @@ -3736,58 +3736,83 @@ static bool map_needs_vmlinux_btf(struct bpf_map = *map) > return bpf_map__is_struct_ops(map); > } > =20 > -static bool obj_needs_vmlinux_btf(const struct bpf_object *obj) > +enum vmlinux_btf_need { > + VMLINUX_BTF_NONE, > + /* Only weak typed ksyms use it. Without kernel BTF they are left > + * unresolved, as on a kernel with BTF that lacks them. > + */ > + VMLINUX_BTF_OPTIONAL, > + VMLINUX_BTF_REQUIRED, > +}; [Severity: Low] BPF code uses the kernel multi-line comment style with the opening /* on its own line, even when surrounding code in the file uses the older style. The newly added multi-line comments here, in bpf_object__load_vmlinux_btf(), and in bpf_object__resolve_externs() should start the text on the line after /*. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261205-libbpf-wea= k-typed-ksyms-no-vmlinux-btf-v1-0-77cc642f7d4b@condado.dev?part=3D2