Re: [PATCH RFC bpf-next 0/9] allow HID-BPF to do device IOs

2024-02-14 Thread Benjamin Tissoires
On Feb 13 2024, Kumar Kartikeya Dwivedi wrote: > On Tue, 13 Feb 2024 at 18:46, Benjamin Tissoires wrote: > > > > On Feb 12 2024, Alexei Starovoitov wrote: > > > On Mon, Feb 12, 2024 at 10:21 AM Benjamin Tissoires > > > wrote: > > > > > > > > On Mon, Feb 12, 2024 at 6:46 PM Toke Høiland-Jørgensen

Re: [PATCH RFC bpf-next 0/9] allow HID-BPF to do device IOs

2024-02-14 Thread Toke Høiland-Jørgensen
Alexei Starovoitov writes: > On Tue, Feb 13, 2024 at 08:51:26PM +0100, Toke Høiland-Jørgensen wrote: >> Kumar Kartikeya Dwivedi writes: >> >> > On Tue, 13 Feb 2024 at 18:46, Benjamin Tissoires >> > wrote: >> >> >> >> On Feb 12 2024, Alexei Starovoitov wrote: >> >> > On Mon, Feb 12, 2024 at 10

Re: [PATCH RFC bpf-next 0/9] allow HID-BPF to do device IOs

2024-02-13 Thread Alexei Starovoitov
On Tue, Feb 13, 2024 at 08:51:26PM +0100, Toke Høiland-Jørgensen wrote: > Kumar Kartikeya Dwivedi writes: > > > On Tue, 13 Feb 2024 at 18:46, Benjamin Tissoires wrote: > >> > >> On Feb 12 2024, Alexei Starovoitov wrote: > >> > On Mon, Feb 12, 2024 at 10:21 AM Benjamin Tissoires > >> > wrote: >

Re: [PATCH RFC bpf-next 0/9] allow HID-BPF to do device IOs

2024-02-13 Thread Alexei Starovoitov
On Tue, Feb 13, 2024 at 08:23:17PM +0100, Kumar Kartikeya Dwivedi wrote: > On Tue, 13 Feb 2024 at 18:46, Benjamin Tissoires wrote: > > > > On Feb 12 2024, Alexei Starovoitov wrote: > > > On Mon, Feb 12, 2024 at 10:21 AM Benjamin Tissoires > > > wrote: > > > > > > > > On Mon, Feb 12, 2024 at 6:46 

Re: [PATCH RFC bpf-next 0/9] allow HID-BPF to do device IOs

2024-02-13 Thread Toke Høiland-Jørgensen
Kumar Kartikeya Dwivedi writes: > On Tue, 13 Feb 2024 at 18:46, Benjamin Tissoires wrote: >> >> On Feb 12 2024, Alexei Starovoitov wrote: >> > On Mon, Feb 12, 2024 at 10:21 AM Benjamin Tissoires >> > wrote: >> > > >> > > On Mon, Feb 12, 2024 at 6:46 PM Toke Høiland-Jørgensen >> > > wrote: >>

Re: [PATCH RFC bpf-next 0/9] allow HID-BPF to do device IOs

2024-02-13 Thread Kumar Kartikeya Dwivedi
On Tue, 13 Feb 2024 at 18:46, Benjamin Tissoires wrote: > > On Feb 12 2024, Alexei Starovoitov wrote: > > On Mon, Feb 12, 2024 at 10:21 AM Benjamin Tissoires > > wrote: > > > > > > On Mon, Feb 12, 2024 at 6:46 PM Toke Høiland-Jørgensen > > > wrote: > > > > > > > > Benjamin Tissoires writes: >

Re: [PATCH RFC bpf-next 0/9] allow HID-BPF to do device IOs

2024-02-13 Thread Benjamin Tissoires
On Feb 12 2024, Alexei Starovoitov wrote: > On Mon, Feb 12, 2024 at 10:21 AM Benjamin Tissoires > wrote: > > > > On Mon, Feb 12, 2024 at 6:46 PM Toke Høiland-Jørgensen > > wrote: > > > > > > Benjamin Tissoires writes: > > > [...] > I agree that workqueue delegation fits into the bpf_timer conce

Re: [PATCH RFC bpf-next 0/9] allow HID-BPF to do device IOs

2024-02-12 Thread Alexei Starovoitov
On Mon, Feb 12, 2024 at 10:21 AM Benjamin Tissoires wrote: > > On Mon, Feb 12, 2024 at 6:46 PM Toke Høiland-Jørgensen > wrote: > > > > Benjamin Tissoires writes: > > > > [...] > > >> IIUC, the bpf_timer callback is just a function (subprog) from the > > >> verifier PoV, so it is verified as wha

Re: [PATCH RFC bpf-next 0/9] allow HID-BPF to do device IOs

2024-02-12 Thread Benjamin Tissoires
On Mon, Feb 12, 2024 at 6:46 PM Toke Høiland-Jørgensen wrote: > > Benjamin Tissoires writes: > > [...] > >> IIUC, the bpf_timer callback is just a function (subprog) from the > >> verifier PoV, so it is verified as whatever program type is creating the > >> timer. So in other words, as long as yo

Re: [PATCH RFC bpf-next 0/9] allow HID-BPF to do device IOs

2024-02-12 Thread Toke Høiland-Jørgensen
Benjamin Tissoires writes: [...] >> IIUC, the bpf_timer callback is just a function (subprog) from the >> verifier PoV, so it is verified as whatever program type is creating the >> timer. So in other words, as long as you setup the timer from inside a >> tracing prog type, you should have access

Re: [PATCH RFC bpf-next 0/9] allow HID-BPF to do device IOs

2024-02-12 Thread Benjamin Tissoires
On Fri, Feb 9, 2024 at 6:05 PM Toke Høiland-Jørgensen wrote: > > Benjamin Tissoires writes: > > > On Fri, Feb 9, 2024 at 4:42 PM Toke Høiland-Jørgensen > > wrote: > >> > >> Benjamin Tissoires writes: > >> > >> > [Putting this as a RFC because I'm pretty sure I'm not doing the things > >> > cor

Re: [PATCH RFC bpf-next 0/9] allow HID-BPF to do device IOs

2024-02-09 Thread Toke Høiland-Jørgensen
Benjamin Tissoires writes: > On Fri, Feb 9, 2024 at 4:42 PM Toke Høiland-Jørgensen wrote: >> >> Benjamin Tissoires writes: >> >> > [Putting this as a RFC because I'm pretty sure I'm not doing the things >> > correctly at the BPF level.] >> > [Also using bpf-next as the base tree as there will b

Re: [PATCH RFC bpf-next 0/9] allow HID-BPF to do device IOs

2024-02-09 Thread Benjamin Tissoires
On Fri, Feb 9, 2024 at 4:42 PM Toke Høiland-Jørgensen wrote: > > Benjamin Tissoires writes: > > > [Putting this as a RFC because I'm pretty sure I'm not doing the things > > correctly at the BPF level.] > > [Also using bpf-next as the base tree as there will be conflicting > > changes otherwise]

Re: [PATCH RFC bpf-next 0/9] allow HID-BPF to do device IOs

2024-02-09 Thread Toke Høiland-Jørgensen
Benjamin Tissoires writes: > [Putting this as a RFC because I'm pretty sure I'm not doing the things > correctly at the BPF level.] > [Also using bpf-next as the base tree as there will be conflicting > changes otherwise] > > Ideally I'd like to have something similar to bpf_timers, but not > in

[PATCH RFC bpf-next 0/9] allow HID-BPF to do device IOs

2024-02-09 Thread Benjamin Tissoires
[Putting this as a RFC because I'm pretty sure I'm not doing the things correctly at the BPF level.] [Also using bpf-next as the base tree as there will be conflicting changes otherwise] Ideally I'd like to have something similar to bpf_timers, but not in soft IRQ context. So I'm emulating this wi