BPF List
 help / color / mirror / Atom feed
From: "Emil Tsalapatis" <emil@etsalapatis.com>
To: <bot+bpf-ci@kernel.org>, <emil@etsalapatis.com>, <bpf@vger.kernel.org>
Cc: <ast@kernel.org>, <andrii@kernel.org>, <memxor@gmail.com>,
	<daniel@iogearbox.net>, <eddyz87@gmail.com>,
	<mattbobrowski@google.com>, <yonghong.song@linux.dev>,
	<vineet.gupta@linux.dev>, <martin.lau@kernel.org>, <clm@meta.com>,
	<ihor.solodrai@linux.dev>
Subject: Re: [PATCH bpf-next v2] bpf: Allow type tag BTF records to succeed other modifier records
Date: Tue, 16 Jun 2026 03:12:42 -0400	[thread overview]
Message-ID: <DJAACNBCFZI8.Z2MZM0DP42G4@etsalapatis.com> (raw)
In-Reply-To: <455ee1eb3aa70bc44f20e6adebe80905d2c63b17d8d3bb44e8eefc01870299d1@mail.kernel.org>

On Tue Jun 16, 2026 at 2:42 AM EDT, bot+bpf-ci wrote:
>>     bpf: Allow type tag BTF records to succeed other modifier records
>>
>>     As of recently, Clang is able to attach type tag records to modifier BTF
>>     records. This is useful for using typedefs that encompass a base type
>>     and a type tag, e.g.:
>>
>>     typedef struct rbtree __arena rbtree_t;
>>
>>     Modify btf_check_type_tags() so that it allows this sequence of records.
>>     The function now only checks for record loops in BTF modifier record
>>     chains. Rename to btf_check_modifier_chain_length to reflect this.
>>
>>     Also expand the BTF modifier traversal code to take into account that
>>     type record can be interleaved with other modifier records. In effect
>>     this means traversing all modifiers to collect the type tags.
>>
>>     Also modify existing selftests to now accept modifier records (const,
>>     typedef) that point to type tag records.
>>
>>     Cc: Yonghong Song <yonghong.song@linux.dev>
>>     Cc: Vineet Gupta <vineet.gupta@linux.dev>
>>     Signed-off-by: Emil Tsalapatis <emil@etsalapatis.com>
>
> This looks like it relaxes a constraint that was added earlier.  It
> removes the "Type tags don't precede modifiers" check (the in_tags logic
> in btf_check_type_tags()) that rejects valid BTF now produced by Clang.
>
> That check was introduced by commit eb596b090558 ("bpf: Ensure type tags
> precede modifiers in BTF").  Should this carry:
>
>   Fixes: eb596b090558 ("bpf: Ensure type tags precede modifiers in BTF")
>

This is not a fix. Circumstances have just changed and we must now
account for interleaving modifiers and type tags. The previous behavior
was fine, and the new behavior is fine too.

>
> ---
> AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
> See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md
>
> CI run summary: https://github.com/kernel-patches/bpf/actions/runs/27598443532


      reply	other threads:[~2026-06-16  7:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-16  6:14 [PATCH bpf-next v2] bpf: Allow type tag BTF records to succeed other modifier records Emil Tsalapatis
2026-06-16  6:42 ` bot+bpf-ci
2026-06-16  7:12   ` Emil Tsalapatis [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=DJAACNBCFZI8.Z2MZM0DP42G4@etsalapatis.com \
    --to=emil@etsalapatis.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bot+bpf-ci@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=clm@meta.com \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=ihor.solodrai@linux.dev \
    --cc=martin.lau@kernel.org \
    --cc=mattbobrowski@google.com \
    --cc=memxor@gmail.com \
    --cc=vineet.gupta@linux.dev \
    --cc=yonghong.song@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