On Tue, Mar 19, 2024 at 12:54 AM Eduard Zingerman wrote:
>
> On Fri, 2024-03-15 at 15:29 +0100, Benjamin Tissoires wrote:
> [...]
>
> > @@ -5279,7 +5281,8 @@ static int map_kptr_match_type(struct
> > bpf_verifier_env *env,
> >
> > static bool in_sleepable(struct bpf_verifier_env *env)
> > {
> >
On Fri, 2024-03-15 at 15:29 +0100, Benjamin Tissoires wrote:
[...]
> @@ -5279,7 +5281,8 @@ static int map_kptr_match_type(struct bpf_verifier_env
> *env,
>
> static bool in_sleepable(struct bpf_verifier_env *env)
> {
> - return env->prog->sleepable;
> + return env->prog->sleepable ||
Now that we have bpf_timer_set_sleepable_cb() available and working, we
can tag the attached callback as sleepable, and let the verifier check
in the correct context the calls and kfuncs.
Signed-off-by: Benjamin Tissoires
---
changes in v4:
- use a function parameter to forward the sleepable in