From: bot+bpf-ci@kernel.org
To: wanjay@amazon.com,bpf@vger.kernel.org,ast@kernel.org,daniel@iogearbox.net,andrii@kernel.org,eddyz87@gmail.com,memxor@gmail.com
Cc: ihor.solodrai@linux.dev,almagui@kernel.org,martin.lau@linux.dev,yonghong.song@linux.dev,jolsa@kernel.org,rostedt@goodmis.org,mhiramat@kernel.org,mathieu.desnoyers@efficios.com,linux-trace-kernel@vger.kernel.org,nathan@kernel.org,nsc@kernel.org,linux-kbuild@vger.kernel.org,arnd@arndb.de,linux-arch@vger.kernel.org,x86@kernel.org,linux-doc@vger.kernel.org,linux-kernel@vger.kernel.org,abuehaze@amazon.com,doebel@amazon.de,mpohlack@amazon.de,jay.wang.upstream@gmail.com,ast@kernel.org,andrii@kernel.org,daniel@iogearbox.net,martin.lau@kernel.org,eddyz87@gmail.com,yonghong.song@linux.dev,mason@kernel.org,ihor.solodrai@linux.dev
Subject: Re: [PATCH bpf-next 01/13] bpf: match program context types by name without vmlinux BTF
Date: Sat, 31 Oct 2026 13:43:23 +0000 (UTC) [thread overview]
Message-ID: <6d1e44ca667bb306e38c0662e42b17d46aff989efd749624fb17d79aab6ac416@mail.kernel.org> (raw)
In-Reply-To: <20261031130959.23472-2-wanjay@amazon.com>
[-- Attachment #1: Type: text/plain, Size: 4138 bytes --]
> bpf: match program context types by name without vmlinux BTF
TL;DR: Commit message only: a "TODO-NEEDS-IHOR: Signed-off-by:" placeholder
isn't a real trailer, so the author's Signed-off-by is missing (checkpatch
would flag it). It should be fixed or removed; other series commits may have
it too.
> bpf: match program context types by name without vmlinux BTF
>
> btf_is_prog_ctx_type() and btf_validate_prog_ctx_type() decide whether
> a BTF function argument is the program's context. They look up the
> canonical context type of the program type in bpf_ctx_convert, a type
> that only exists in the vmlinux BTF, but then use nothing but its name:
> the argument's type name is compared with it, with the __sk_buff ->
> sk_buff and xdp_md -> xdp_buff projections, and with one typedef
> resolution step for bpf_user_pt_regs_t.
>
> btf_prepare_func_args() runs this check for the main program of every
> load that carries func_info (e.g. the socket filter and cgroup programs
> systemd loads at boot) and for subprograms. Once the vmlinux BTF is
> parsed on first use (CONFIG_DEBUG_INFO_BTF_LAZY, later in this series),
> fetching the BTF here would make all of them pay for parsing it, and
> skipping the check when the BTF is not there yet would make the
> verification result (e.g. func_info "unreliable") depend on whether
> something else parsed the BTF first.
>
> Take the names from include/linux/bpf_types.h instead: a table indexed
> by program type is built from the prog_ctx_type argument of
> BPF_PROG_TYPE(), and prog_ctx_tname() returns the struct tag, or the
> typedef name. For bpf_user_pt_regs_t it also returns the name of the
> underlying struct, found with __builtin_types_compatible_p() the same
> way btf_validate_prog_ctx_type() already does for perf_event programs.
> The other forms are equivalent to what the BTF lookup produced:
>
> - typedefs of integers (__u64, __u32): the old code compared the
> typedef name and then the integer type name, which never equals a
> struct tag; only the typedef name is compared now;
> - "void *" (tracing, struct_ops, ext, lsm, syscall): no named context
> type, as before;
> - s390 typedefs bpf_user_pt_regs_t to an anonymous struct: nothing
> matches, as before; only the __arg_ctx error message changes from
> "should be `struct *`" to "should be void pointer";
> - program types that are not configured in used to index
> bpf_ctx_convert_map[] with 0 (socket filter); they now get no name.
> Such programs cannot be loaded anyway.
>
> find_kern_ctx_type_id() and get_kern_ctx_btf_id() still need the kernel
> context type (tracing/EXT access to a BPF program's context argument,
> bpf_cast_to_kern_ctx()). Kernel types enter the program there, so they
> now fetch the vmlinux BTF with bpf_get_btf_vmlinux() instead of relying
> on bpf_check() having done it.
>
> No change with CONFIG_DEBUG_INFO_BTF=y. With CONFIG_DEBUG_INFO_BTF=n,
> global subprograms taking e.g. a struct __sk_buff *ctx now verify
> instead of failing with "btf_vmlinux is malformed", as they do with =y.
>
> TODO-NEEDS-IHOR: Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
> [split the BPF_PROG_TYPE() definition over two lines]
> Signed-off-by: Jay Wang <wanjay@amazon.com>
Is the "TODO-NEEDS-IHOR: Signed-off-by:" line at the end of the commit
message meant to stay in the submitted patch?
Because of the prefix, git and checkpatch do not parse that line as a
trailer, so the only real Signed-off-by is Jay Wang's, while the patch is
authored by Ihor Solodrai. checkpatch would report "Missing Signed-off-by:
line by nominal patch author".
Should this become a real Signed-off-by line from the author (or be removed),
as required by the Developer's Certificate of Origin in
Documentation/process/submitting-patches.rst? The same placeholder appears in
other commits of this series (for example 32ad8adbb1a8).
---
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/41205212136
next prev parent reply other threads:[~2026-10-31 13:43 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-31 13:09 [PATCH bpf-next 00/13] bpf: keep the vmlinux BTF compressed until first use (CONFIG_DEBUG_INFO_BTF_LAZY) to save ~6 MB memory Jay Wang
2026-10-31 13:09 ` [PATCH bpf-next 01/13] bpf: match program context types by name without vmlinux BTF Jay Wang
2026-10-31 13:43 ` bot+bpf-ci [this message]
2026-10-31 13:09 ` [PATCH bpf-next 02/13] bpf: fetch the vmlinux BTF where kernel types enter a program Jay Wang
2026-10-31 13:55 ` bot+bpf-ci
2026-10-31 13:09 ` [PATCH bpf-next 03/13] bpf: check CAP_SYS_ADMIN before looking up bpffs delegation names Jay Wang
2026-10-31 13:43 ` bot+bpf-ci
2026-10-31 17:03 ` Alexei Starovoitov
2026-10-31 13:09 ` [PATCH bpf-next 04/13] bpf: move bpf_get_btf_vmlinux() to btf.c Jay Wang
2026-10-31 13:43 ` bot+bpf-ci
2026-10-31 13:09 ` [PATCH bpf-next 05/13] bpf: let btf_parse_module() adopt the caller's copy of the module BTF Jay Wang
2026-10-31 13:09 ` [PATCH bpf-next 06/13] bpf: look up the struct_ops common value type in the given BTF Jay Wang
2026-10-31 13:09 ` [PATCH bpf-next 07/13] bpf: parse the vmlinux BTF before taking cand_cache_mutex Jay Wang
2026-10-31 13:43 ` bot+bpf-ci
2026-10-31 13:09 ` [PATCH bpf-next 08/13] tracing: parse the vmlinux BTF when BTF-typed output is enabled Jay Wang
2026-10-31 13:43 ` bot+bpf-ci
2026-10-31 13:09 ` [PATCH bpf-next 09/13] bpf: keep the vmlinux BTF zstd-compressed in the kernel image Jay Wang
2026-10-31 13:55 ` bot+bpf-ci
2026-10-31 13:09 ` [PATCH bpf-next 10/13] bpf: defer kfunc and struct_ops registrations until first BTF use Jay Wang
2026-10-31 13:55 ` bot+bpf-ci
2026-10-31 17:07 ` Alexei Starovoitov
2026-10-31 13:09 ` [PATCH bpf-next 11/13] bpf: keep module BTF until the vmlinux BTF is parsed Jay Wang
2026-10-31 13:55 ` bot+bpf-ci
2026-10-31 17:10 ` Alexei Starovoitov
2026-10-31 13:09 ` [PATCH bpf-next 12/13] selftests/bpf: keep ksyms and linked_vars working without __start_BTF Jay Wang
2026-10-31 13:09 ` [PATCH bpf-next 13/13] Documentation/bpf: describe CONFIG_DEBUG_INFO_BTF_LAZY Jay Wang
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=6d1e44ca667bb306e38c0662e42b17d46aff989efd749624fb17d79aab6ac416@mail.kernel.org \
--to=bot+bpf-ci@kernel.org \
--cc=abuehaze@amazon.com \
--cc=almagui@kernel.org \
--cc=andrii@kernel.org \
--cc=arnd@arndb.de \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=doebel@amazon.de \
--cc=eddyz87@gmail.com \
--cc=ihor.solodrai@linux.dev \
--cc=jay.wang.upstream@gmail.com \
--cc=jolsa@kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=martin.lau@kernel.org \
--cc=martin.lau@linux.dev \
--cc=mason@kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=memxor@gmail.com \
--cc=mhiramat@kernel.org \
--cc=mpohlack@amazon.de \
--cc=nathan@kernel.org \
--cc=nsc@kernel.org \
--cc=rostedt@goodmis.org \
--cc=wanjay@amazon.com \
--cc=x86@kernel.org \
--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
all inboxes | Powered by JetHome®