Interactive eBPF playground
56 points by deivid
56 points by deivid
I've wanted to build a platform like this for a long time, and during the holiday break I found some time to get started.
This website lets you write eBPF code in the browser, and execute it on a dedicated server.
Building the tech side was a lot of fun, but it wasn't the most challenging part. Trying to come up with exercises and some kind of "flow" between them was much harder!
Wow! As someone who has been curious about eBPF for a while, this is great!
I have a question: is it possible to combine eBPF with Linux namespaces or landlock? Like can I notice that X program launches and limit its access?
You can use Linux Security Module (LSM) eBPF programs for something like this, is that what you had in mind?
This is super cool! My only wish is for vim bindings :P
It's actually something I had in mind! I've just enabled the vim plugin for CodeMirror, just don't ctrl-w because that'll close your tab :)
Up to you, but I believe there is a setting through which the app can capture keybindings that would otherwise invoke the browser's hotkeys, offered by the browser in the spirit of enabling gaming on the web. Regrettably, I wasn't able to dig up a supporting MDN link in order to know if it's an allowlist or it would otherwise require putting the window into fullscreen mode to achieve it
Wow, this is a great structure for a tutorial, and so much work was put into it. Thanks for making it!
From the how it works page (which, sidebar, is almost unreadable):
The backend will compile your code to a BPF object using clang and spin up a fresh VM to execute it.
That's very cool although when I read the tagline I thought it was going to be running the VM in your browser too. Which... might be doable? People are building clang for wasm, and there's projects for running Linux in the browser by virtualizing X86 (also in wasm).
this is just wonderful ! one trivial comment: may you please consider adding a light and dark mode to the website ? the how-it-works renders like this on safari on mac-os. it is quite hard to read.