Welcome back to my series on ebpf. In the last post, I told you how to build a Firewall with Java and eBPF. I gave and will give the talk on the very same topic at multiple conferences, as mentioned at the end of the post. Last week, I gave it, together with Mohammed Aboullaite, at one of my favorite Java conferences: JavaZone. One of the reasons I recommend this conference to every upcoming speaker is that they create really good recordings of every talk and upload them to Vimeo almost immediately. So here is the recording of the talk:
You can find the slides here.
As a courtesy to the listener, I created a list of resources on eBPF that helped me a lot:
Main
- main website: https://ebpf.io
- some information: https://www.brendangregg.com/ebpf.html
- https://www.infoq.com/presentations/facebook-google-bpf-linux-kernel/
- docs: https://ebpf-docs.dylanreimerink.nl/
- Learning eBPF – Liz Rice’s book: https://isovalent.com/books/learning-ebpf/
- good tutorial: https://eunomia.dev/tutorials/
- another good series: https://ansilh.com/series/ebpf/
- eBPF slack channel: https://cilium.slack.com/archives/C4XCTGYEM
History
- https://cilium.io/blog/2020/11/10/ebpf-future-of-networking/
- eBPF documentary: https://ebpf.io/blog/2023/11/03/the-ebpf-documentary/
Packet filtering
- https://dev.to/douglasmakey/harnessing-ebpf-and-xdp-for-ddos-mitigation-a-rust-adventure-with-rust-aya-4k1h
- XDP performance: https://blog.cloudflare.com/how-to-drop-10-million-packets/
- firewall with c groups: https://nfil.dev/coding/security/ebpf-firewall-with-cgroups/
- in Java: https://mostlynerdless.de/blog/2024/07/30/hello-ebpf-write-your-ebpf-application-in-pure-java-12/
Scheduling
- collection of schedulers: https://github.com/sched-ext/scx
- kernel code: https://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext.git/tree/kernel/sched/ext.c?h=for-6.12
- sched-ext presentation: https://www.youtube.com/watch?v=8kAcnNVSAdI
- podcast episode with David Vernet: https://www.youtube.com/watch?v=Ta0imAIz31M
- sched-ext slack channel: https://join.slack.com/t/schedextworkspace/shared_invite/zt-2qhwfak1t-SrcOpddFStKWirCO_XUNNw
- good tutorial: https://blogs.igalia.com/changwoo/sched-ext-a-bpf-extensible-scheduler-class-part-1/
- talk on building a scheduler that schedules in userland: https://www.youtube.com/watch?v=HQRHo8E_4Ks
- notable blog on eBPF schedulers: https://arighi.blogspot.com/
Offensive BPF
- https://embracethered.com/blog/posts/2021/offensive-bpf-libbpf-bpf_probe_write_user/
- https://blog.tofile.dev/2021/08/01/bad-bpf.html
Misc
- Byte code for a simple program: https://godbolt.org/z/9xoMzsc4b
- Brendan Gregg shouting in a data center: https://www.youtube.com/watch?v=tDacjrSCeq4
- Java forever: https://www.youtube.com/watch?v=X3AWV5lJ6RY
- Windows support for eBPF: https://github.com/microsoft/ebpf-for-windows
I hope this collection and my talk help you get started with eBPF (and be sure to read my old blog posts if you have not already). Feel free to add more links to gist on GitHub.
See you tomorrow for a blog post on writing a simple Linux scheduler, which I will present at the eBPF summit on September 11th. Register for this online summit if you haven’t already.
This article is part of my work in the SapMachine team at SAP, making profiling and debugging easier for everyone.