Is BPF just a worse version of WebAssembly?
Is BPF just a worse version of WebAssembly?
Posted Apr 16, 2025 17:38 UTC (Wed) by daroc (editor, #160859)In reply to: Is BPF just a worse version of WebAssembly? by DemiMarie
Parent article: Taking BPF programs beyond one-million instructions
Whether that approach is worthwhile compared to WebAssembly is a value judgement; you could theoretically replace BPF with WebAssembly in the kernel, if you were willing to customize the runtime to do the necessary checks. I don't think anyone has done a good comparison of what the speed impact would be, although there would likely be some overhead, at least.
Posted Apr 16, 2025 18:36 UTC (Wed)
by Cyberax (✭ supporter ✭, #52523)
[Link] (2 responses)
But only for one lock at a time. It would have been trivially easy (and just as fast) to do in runtime.
> Whether that approach is worthwhile compared to WebAssembly is a value judgement; you could theoretically replace BPF with WebAssembly in the kernel, if you were willing to customize the runtime to do the necessary checks
You can't automatically reason about complicated code. So the BPF infrastructure is already growing all sorts of runtime checkers.
I predict that we'll get a classic "memory safe BPF without a verifier" within maybe 2 years, once it becomes clear that the verifier is a fifth wheel.
Posted Apr 16, 2025 19:26 UTC (Wed)
by npws (subscriber, #168248)
[Link] (1 responses)
Posted Apr 17, 2025 4:58 UTC (Thu)
by Cyberax (✭ supporter ✭, #52523)
[Link]
Posted Apr 16, 2025 20:06 UTC (Wed)
by epa (subscriber, #39769)
[Link] (1 responses)
Posted Apr 16, 2025 21:18 UTC (Wed)
by daroc (editor, #160859)
[Link]
In this case, though, I think there's an important difference between Rust's guarantees and BPF's guarantees: who does the checking. I'm currently working on writing up an LSFMM+BPF article about signing BPF programs, and it's a hard question because ideally you want verification to happen in the kernel, so that you don't need to trust in user space.
Is BPF just a worse version of WebAssembly?
Is BPF just a worse version of WebAssembly?
Is BPF just a worse version of WebAssembly?
Is BPF just a worse version of WebAssembly?
Is BPF just a worse version of WebAssembly?