Re: [PATCH bpf-next v3 1/2] bpf: Fix sleepable check for tracing prog
Leon Hwang <[email protected]>
| Newsgroups | org.kernel.vger.netdev,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On 5/8/26 07:39, Andrii Nakryiko wrote: > On Tue, Aug 4, 2026 at 7:57 AM Leon Hwang <[email protected]> wrote: [...] >> diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c >> index b274004fccfd..7bb541e343b2 100644 >> --- a/kernel/bpf/verifier.c >> +++ b/kernel/bpf/verifier.c >> @@ -19019,6 +19019,9 @@ static int btf_id_allow_sleepable(u32 btf_id, unsigned long addr, const struct b >> >> switch (prog->type) { >> case BPF_PROG_TYPE_TRACING: >> + if (!btf_is_kernel(btf)) >> + return -EINVAL; >> + > > see sashiko reply, just move it outside of switch and disallow > sleepable for anything that is not kernel/module BTF, regardless of > program type > Ack. I think another Fixes tag is needed for the LSM case. Thanks, Leon