Re: [PATCH bpf-next 3/6] bpf: fetch the vmlinux BTF where kernel types enter a program
From: Jay Wang
Date: Fri Sep 25 2026 - 19:04:32 EST
On Thu, Sep 24, 2026 at 01:26:36PM +0200, Jiri Olsa wrote:
> seems valid to me, could we just check for these two print helpers in
> helper_uses_vmlinux_btf ?
Yes, that is what the series does since v2 (now v3, patch 3/9):
https://lore.kernel.org/bpf/20260925224229.1850-1-wanjay@xxxxxxxxxx/
helper_uses_vmlinux_btf() also matches BPF_FUNC_snprintf_btf and
BPF_FUNC_seq_printf_btf, so the verifier loads the vmlinux BTF when a
program calls either of them, and the runtime peek in
bpf_btf_printf_prepare() then always finds it. Tested with a raw_tp
program calling bpf_snprintf_btf() as the first BTF user after boot.
Thanks,
Jay