BPF List
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Haowen Deng" <denghaowen59@gmail.com>, bpf@vger.kernel.org
Subject: Re: [PATCH bpf] libbpf: Ignore integer type names in CO-RE type matching
Date: Wed, 02 Dec 2026 14:26:33 +0000	[thread overview]
Message-ID: <sashiko-outbox-245957@kernel.org> (raw)
In-Reply-To: <20261202141620.366-1-denghaowen59@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] libbpf: non-standard multi-line comment style in
  __bpf_core_types_match()
--

commit f67211ffe5606e27596cd47c946078ed431f5a75
Author: Haowen Deng <denghaowen59@gmail.com>

libbpf: Ignore integer type names in CO-RE type matching

This commit skips the BTF type name comparison for BTF_KIND_INT in
__bpf_core_types_match() so integer types match solely by size and
signedness across compilers, and adds a corresponding selftest.

> diff --git a/tools/lib/bpf/relo_core.c b/tools/lib/bpf/relo_core.c
> index 2672623a41989..9d81688bb4cbc 100644
> --- a/tools/lib/bpf/relo_core.c
> +++ b/tools/lib/bpf/relo_core.c
> @@ -1582,16 +1582,20 @@ int __bpf_core_types_match(const struct btf *local_btf, __u32 local_id, const st
>  	if (!local_t || !targ_t)
>  		return -EINVAL;
>  
> -	/* While the name check happens after typedefs are skipped, root-level
> +	local_k = btf_kind(local_t);
> +	targ_k = btf_kind(targ_t);
> +
> +	/* Integer type names can differ by compiler. Match them by size and
> +	 * signedness below.
> +	 *
> +	 * While the name check happens after typedefs are skipped, root-level
>  	 * typedefs would still be name-matched as that's the contract with
>  	 * callers.
>  	 */

[Severity: Low]
This isn't a bug, but BPF multi-line comment style puts the opening /* on
its own line with the comment text starting on the next line.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261202141620.366-1-denghaowen59@gmail.com?part=1

      reply	other threads:[~2026-12-02 14:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02 14:16 [PATCH bpf] libbpf: Ignore integer type names in CO-RE type matching Haowen Deng
2026-12-02 14:26 ` sashiko-bot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-245957@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=denghaowen59@gmail.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox