Re: [PATCH 4/7] io_uring/bpf_filter: cache lookup table in ctx->bpf_filters
From: Christian Brauner
Date: Tue Jan 27 2026 - 04:38:07 EST
On Mon, Jan 19, 2026 at 04:54:27PM -0700, Jens Axboe wrote:
> Currently a few pointer dereferences need to be made to both check if
> BPF filters are installed, and then also to retrieve the actual filter
> for the opcode. Cache the table in ctx->bpf_filters to avoid that.
>
> Add a bit of debug info on ring exit to show if we ever got this wrong.
> Small risk of that given that the table is currently only updated in one
> spot, but once task forking is enabled, that will add one more spot.
>
> Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
> ---
Reviewed-by: Christian Brauner <brauner@xxxxxxxxxx>