News for hackers. Stuff that matters.
Re:Standardizing BPF by bheadmaster on Friday April 21, 2023 @12:39AM (#35649866)
> BPF programs are written in C, and compiled into BPF bytecode. Like other bytecode instruction sets, BPF programs are platform-independent and just-in-time (JIT) compiled.

That sounds similar to what Inferno was doing. Though I'm unaware whether Inferno did it in kernel space, but PhantomOS definitely did - their argument was that, since you can't run native code directly, only through the bytecode, memory safety can be achieved by simply not giving a program any reference to a memory address it's not supposed to access. Apparently, this approach achieves memory protection without using an MMU.

Would be cool to see if Linux eventually goes down that path.

Re:Standardizing BPF by pjmlp on Friday April 21, 2023 @01:53AM (#35650189)
Inferno uses C (Plan 9 C dialect) for the kernel and Limbo for the complete userspace, with exception of some C libraries like Tk for the GUI.

DisVM runs in userspace.

https://github.com/inferno-os

Re:Standardizing BPF by amelius on Friday April 21, 2023 @08:12AM (#35652555)
Java did this in the 90s. Not sure why we need yet another bytecode format.
Re:Standardizing BPF by bheadmaster on Friday April 21, 2023 @09:10AM (#35653170)
Bytecode format itself is not interesting (PhantomOS runs Java bytecode, Inferno was a competitor to Java in the 90s), but the way it is executed.

Java runs bytecode in a VM as a userspace process, eBPF runs it in kernel space. That in itself is interesting.

Re:Standardizing BPF by amelius on Friday April 21, 2023 @01:51PM (#35657493)
Does running in kernel space justify an entirely new bytecode?
Re:Standardizing BPF by bheadmaster on Friday April 21, 2023 @03:37PM (#35658915)
Justify? I don't know. Require? I also don't know, but intuition tells me that it does, at least in the case of Linux.