Re: [PATCH bpf-next 3/6] libbpf: Add feature for kernel extended vlen/kind support

bot+bpf-ci
2026-04-14T20:29:19Z

[-- Attachment #1: Type: text/plain, Size: 1131 bytes --]

> diff --git a/tools/lib/bpf/libbpf_internal.h b/tools/lib/bpf/libbpf_internal.h
> index 3781c45b46d3..8ef1fc96b73a 100644
> --- a/tools/lib/bpf/libbpf_internal.h
> +++ b/tools/lib/bpf/libbpf_internal.h
> @@ -398,6 +398,8 @@ enum kern_feature_id {
> FEAT_UPROBE_SYSCALL,
> /* Kernel supports BTF layout information */
> FEAT_BTF_LAYOUT,
> + /* Kernel supports BTF vlen > 65535 */
> + FEAT_BTF_VLEN_KIND_EXTENDED,
> __FEAT_CNT,
> };

This isn't a bug, but the comment says "BTF vlen > 65535" while the
feature also covers extended BTF kinds (> 31). The enum name itself
says VLEN_KIND_EXTENDED, the feature descriptor in features.c says
"kernel supports extended BTF vlen/kind", and the sanitization check
in bpf_object__sanitize_btf() tests both btf_vlen(t) > 0xffff and
btf_kind(t) > 0x1f.

Should the comment be something like
"Kernel supports extended BTF vlen/kind" to match?

---
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/24420385267