Re: [PATCH bpf-next v5 2/6] bpf/verifier: add bpf_timer as a kfunc capable type

2024-03-25 Thread Benjamin Tissoires
On Mar 24 2024, Alexei Starovoitov wrote: > On Sat, Mar 23, 2024 at 9:57 PM Kumar Kartikeya Dwivedi > wrote: > > > > > > > > > > > Observation is correct. The patch is buggy, > > > > > but the suggestion to follow process_dynptr_func() will lead > > > > > to unnecessary complexity. > > > > >

Re: [PATCH bpf-next v5 2/6] bpf/verifier: add bpf_timer as a kfunc capable type

2024-03-24 Thread Alexei Starovoitov
On Sat, Mar 23, 2024 at 9:57 PM Kumar Kartikeya Dwivedi wrote: > > > > > > > > Observation is correct. The patch is buggy, > > > > but the suggestion to follow process_dynptr_func() will lead > > > > to unnecessary complexity. > > > > dynptr-s are on stack with plenty of extra checks. > > > > >

Re: [PATCH bpf-next v5 2/6] bpf/verifier: add bpf_timer as a kfunc capable type

2024-03-23 Thread Kumar Kartikeya Dwivedi
On Sun, 24 Mar 2024 at 05:38, Alexei Starovoitov wrote: > > On Sat, Mar 23, 2024 at 9:01 PM Kumar Kartikeya Dwivedi > wrote: > > > > On Sun, 24 Mar 2024 at 04:53, Alexei Starovoitov > > wrote: > > > > > > On Fri, Mar 22, 2024 at 9:31 AM Kumar Kartikeya Dwivedi > > > wrote: > > > > > > > > On

Re: [PATCH bpf-next v5 2/6] bpf/verifier: add bpf_timer as a kfunc capable type

2024-03-23 Thread Alexei Starovoitov
On Sat, Mar 23, 2024 at 9:01 PM Kumar Kartikeya Dwivedi wrote: > > On Sun, 24 Mar 2024 at 04:53, Alexei Starovoitov > wrote: > > > > On Fri, Mar 22, 2024 at 9:31 AM Kumar Kartikeya Dwivedi > > wrote: > > > > > > On Fri, 22 Mar 2024 at 15:57, Benjamin Tissoires > > > wrote: > > > > > > > > We

Re: [PATCH bpf-next v5 2/6] bpf/verifier: add bpf_timer as a kfunc capable type

2024-03-23 Thread Kumar Kartikeya Dwivedi
On Sun, 24 Mar 2024 at 04:53, Alexei Starovoitov wrote: > > On Fri, Mar 22, 2024 at 9:31 AM Kumar Kartikeya Dwivedi > wrote: > > > > On Fri, 22 Mar 2024 at 15:57, Benjamin Tissoires wrote: > > > > > > We need to extend the bpf_timer API, but the way forward relies on kfuncs. > > > So make

Re: [PATCH bpf-next v5 2/6] bpf/verifier: add bpf_timer as a kfunc capable type

2024-03-23 Thread Alexei Starovoitov
On Fri, Mar 22, 2024 at 9:31 AM Kumar Kartikeya Dwivedi wrote: > > On Fri, 22 Mar 2024 at 15:57, Benjamin Tissoires wrote: > > > > We need to extend the bpf_timer API, but the way forward relies on kfuncs. > > So make bpf_timer known for kfuncs from the verifier PoV > > > > Signed-off-by:

Re: [PATCH bpf-next v5 2/6] bpf/verifier: add bpf_timer as a kfunc capable type

2024-03-22 Thread Kumar Kartikeya Dwivedi
On Fri, 22 Mar 2024 at 15:57, Benjamin Tissoires wrote: > > We need to extend the bpf_timer API, but the way forward relies on kfuncs. > So make bpf_timer known for kfuncs from the verifier PoV > > Signed-off-by: Benjamin Tissoires > > --- > > changes in v5: > - also check for the reg offset > >

[PATCH bpf-next v5 2/6] bpf/verifier: add bpf_timer as a kfunc capable type

2024-03-22 Thread Benjamin Tissoires
We need to extend the bpf_timer API, but the way forward relies on kfuncs. So make bpf_timer known for kfuncs from the verifier PoV Signed-off-by: Benjamin Tissoires --- changes in v5: - also check for the reg offset changes in v4: - enforce KF_ARG_PTR_TO_TIMER to be of type PTR_TO_MAP_VALUE