[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEf4BzYzZ_84-AdwGbzhrqyGJ=1gT=9AtRAuA59k4BwT8R-SbQ@mail.gmail.com>
Date: Thu, 13 Oct 2022 08:32:09 -0700
From: Andrii Nakryiko <andrii.nakryiko@...il.com>
To: David Vernet <void@...ifault.com>
Cc: bpf@...r.kernel.org, andrii@...nel.org, ast@...nel.org,
martin.lau@...ux.dev, daniel@...earbox.net, song@...nel.org,
yhs@...com, john.fastabend@...il.com, kpsingh@...nel.org,
sdf@...gle.com, haoluo@...gle.com, jolsa@...nel.org,
linux-kernel@...r.kernel.org, kernel-team@...com
Subject: Re: [PATCH 0/2] Allow bpf_user_ringbuf_drain() callbacks to return 1
On Wed, Oct 12, 2022 at 4:20 PM David Vernet <void@...ifault.com> wrote:
>
> The bpf_user_ringbuf_drain() helper function allows a BPF program to
> specify a callback that is invoked when draining entries from a
> BPF_MAP_TYPE_USER_RINGBUF ring buffer map. The API is meant to allow the
> callback to return 0 if it wants to continue draining samples, and 1 if
> it's done draining. Unfortunately, bpf_user_ringbuf_drain() landed shortly
> after commit 1bfe26fb0827 ("bpf: Add verifier support for custom
> callback return range"), which changed the default behavior of callbacks
> to only support returning 0, and the corresponding necessary change to
> bpf_user_ringbuf_drain() callbacks was missed.
>
> This patch set fixes this oversight, and updates the user_ringbuf
> selftests to return 1 in a callback to catch future instances of
> regression.
>
> This patch set should be merged to the bpf tree.
Please tag patch as [PATCH bpf x/N] next time. This will make it clear
that it's targeted against the bpf tree and will let our CI know that
it should be applied and tested in bpf (it chooses bpf-next by
default).
>
> David Vernet (2):
> bpf: Allow bpf_user_ringbuf_drain() callbacks to return 1
> selftests/bpf: Make bpf_user_ringbuf_drain() selftest callback return
> 1
>
> kernel/bpf/verifier.c | 1 +
> tools/testing/selftests/bpf/progs/user_ringbuf_success.c | 4 ++--
> 2 files changed, 3 insertions(+), 2 deletions(-)
>
> --
> 2.38.0
>
Powered by blists - more mailing lists