Re: [PATCH bpf] libbpf: Fix program log buffer size validation
From: Luís Vieira
Date: Mon Sep 14 2026 - 14:26:45 EST
On Mon, Sep 14, 2026 at 10:22 AM Mykyta Yatsenko
<mykyta.yatsenko5@xxxxxxxxx> wrote:
> The change looks correct, few questions:
> * Do we really need a unit test for this? We are not testing those error
> conditions now.
Agreed. I'll drop the selftest in v2.
> * While here should we rewrite the first check as (!!log_buf != !!log_size), to
> cover the case when log_size == 0 but log_buf is nonnull (we check it later in
> bpf_prog_load()) (AI)
Makes sense. I'll update the setter to validate the buffer/size pair
consistently with bpf_prog_load().
> * Fixes tag is probably not needed, because this is libbpf, target bpf-next.
Agreed. I'll retarget v2 to bpf-next and drop the Fixes tag.
Thanks for the review.