Re: [PATCH bpf-next 0/4] bpf: tailcall: Eliminate max_entries and bpf_func access at runtime
From: Alexei Starovoitov
Date: Wed Jan 14 2026 - 16:56:29 EST
On Wed, Jan 14, 2026 at 1:00 PM Jiri Olsa <olsajiri@xxxxxxxxx> wrote:
>
> >
> > > fyi I briefly discussed that with Andrii indicating that it might not
> > > be worth the effort at this stage.
> >
> > depending on complexity of course.
>
> for my tests I just had to allow BPF_MAP_TYPE_PROG_ARRAY map
> for sleepable programs
>
> jirka
>
>
> ---
> diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
> index faa1ecc1fe9d..1f6fc74c7ea1 100644
> --- a/kernel/bpf/verifier.c
> +++ b/kernel/bpf/verifier.c
> @@ -20969,6 +20969,7 @@ static int check_map_prog_compatibility(struct bpf_verifier_env *env,
> case BPF_MAP_TYPE_STACK:
> case BPF_MAP_TYPE_ARENA:
> case BPF_MAP_TYPE_INSN_ARRAY:
> + case BPF_MAP_TYPE_PROG_ARRAY:
> break;
> default:
> verbose(env,
Think it through, add selftests, ship it.
On the surface the easy part is to make
__bpf_prog_map_compatible() reject sleepable/non-sleepable combo.
Maybe there are other things.