Here is a brief overview of what we intend to do in the eBPF for Windows code:
The user space app will not directly write into the underlying ring buffer of the eBPF map. Instead, the user app (via the libbpf API) will send the data via an
IOCTL to the eBPF core (a Windows
kernel driver) that manages the ring buffer map. The driver will internally invoke the same code that implements the bpf_ringbuf_output helper function to write the user provided data buffer into the ring buffer map.
I am not aware of how the ring buffer map is implemented in the Linux kernel. But presumably a similar approach could be taken in Linux as well?
Thanks,
From: Andrii Nakryiko <andrii.nakryiko@xxxxxxxxx>
Sent: Monday, June 24, 2024 8:36 PM To: Shankar Seal <Shankar.Seal@xxxxxxxxxxxxx> Cc: Shankar Seal <Shankar.Seal=40microsoft.com@xxxxxxxxxxxxxx>; dthaler1968=40googlemail.com@xxxxxxxxxxxxxx <dthaler1968=40googlemail.com@xxxxxxxxxxxxxx>; bpf@xxxxxxxx <bpf@xxxxxxxx>; bpf@xxxxxxxxxxxxxxx <bpf@xxxxxxxxxxxxxxx> Subject: Re: [Bpf] Re: [EXTERNAL] RE: Re: Writing into a ring buffer map from user space On Thu, Jun 20, 2024 at 11:49 PM Shankar Seal <Shankar.Seal@xxxxxxxxxxxxx> wrote:
I think the devil will be in the details. API itself makes sense (you can't simplify it further or make it much different), in the end, you are just sending an array of bytes into ringbuf.
But the implementation details are what matters. How the notification works. How user space won't break kernel even if intentionally trying, etc. It's not clear where you intend to implement this, etc.
|
-- Bpf mailing list -- bpf@xxxxxxxx To unsubscribe send an email to bpf-leave@xxxxxxxx