All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yonghong Song <yonghong.song@linux.dev>
To: Alan Maguire <alan.maguire@oracle.com>, andrii@kernel.org
Cc: ast@kernel.org, jolsa@kernel.org, daniel@iogearbox.net,
	martin.lau@linux.dev, eddyz87@gmail.com, song@kernel.org,
	john.fastabend@gmail.com, kpsingh@kernel.org, sdf@fomichev.me,
	haoluo@google.com, nilay@linux.ibm.com, bvanassche@acm.org,
	bpf@vger.kernel.org
Subject: Re: [PATCH bpf] libbpf: BTF dedup should ignore modifiers in type equivalence checks
Date: Fri, 9 Jan 2026 08:28:04 -0800	[thread overview]
Message-ID: <5eccbe20-7439-4c2d-a60d-bc0c11995207@linux.dev> (raw)
In-Reply-To: <20260109101325.47721-1-alan.maguire@oracle.com>



On 1/9/26 2:13 AM, Alan Maguire wrote:
> We see identical type problems in [1] as a result of an occasionally
> applied volatile modifier to kernel data structures. Such things can
> result from different header include patterns, explicit Makefile
> rules etc.  As a result consider types with modifiers const, volatile
> and restrict as equivalent for dedup equivalence testing purposes.
>
> Type tag is excluded from modifier equivalence as it would be possible
> we would end up with the type without the type tag annotations in the
> final BTF, which could potentially lead to information loss.
>
> [1] https://lore.kernel.org/bpf/42a1b4b0-83d0-4dda-b1df-15a1b7c7638d@linux.ibm.com/
>
> Reported-by: Nilay Shroff <nilay@linux.ibm.com>
> Signed-off-by: Alan Maguire <alan.maguire@oracle.com>

Tested with llvm22 and gcc15 for config including CONFIG_DEBUG_INFO_BTF
and CONFIG_KCSAN. Both work properly.

Tested-by: Yonghong Song <yonghong.song@linux.dev>


  parent reply	other threads:[~2026-01-09 16:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-09 10:13 [PATCH bpf] libbpf: BTF dedup should ignore modifiers in type equivalence checks Alan Maguire
2026-01-09 10:33 ` bot+bpf-ci
2026-01-09 12:24   ` Alan Maguire
2026-01-09 16:28 ` Yonghong Song [this message]
2026-01-09 17:28 ` Andrii Nakryiko
2026-01-10 14:05   ` Alan Maguire
2026-01-13 21:48     ` Andrii Nakryiko
2026-01-14 18:41       ` Alan Maguire

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=5eccbe20-7439-4c2d-a60d-bc0c11995207@linux.dev \
    --to=yonghong.song@linux.dev \
    --cc=alan.maguire@oracle.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=bvanassche@acm.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=haoluo@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=nilay@linux.ibm.com \
    --cc=sdf@fomichev.me \
    --cc=song@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.