Re: [PATCH bpf-next v10 5/8] bpf: Add syscall common attributes support for btf_load

From: Andrii Nakryiko

Date: Wed Feb 11 2026 - 17:12:49 EST


On Wed, Feb 11, 2026 at 7:13 AM Leon Hwang <leon.hwang@xxxxxxxxx> wrote:
>
> BPF_BTF_LOAD can now take log parameters from both union bpf_attr and
> struct bpf_common_attr, with the same merge rules as BPF_PROG_LOAD:
>
> - if both sides provide a complete log tuple (buf/size/level) and they
> match, use it;
> - if only one side provides log parameters, use that one;
> - if both sides provide complete tuples but they differ, return -EINVAL.
>
> Signed-off-by: Leon Hwang <leon.hwang@xxxxxxxxx>
> ---
> include/linux/btf.h | 3 ++-
> kernel/bpf/btf.c | 30 +++++++-----------------------
> kernel/bpf/syscall.c | 11 ++++++++---
> 3 files changed, 17 insertions(+), 27 deletions(-)
>

same remark about user space only log_true_size, but overall LGTM

Acked-by: Andrii Nakryiko <andrii@xxxxxxxxxx>

[...]