by fwsgonzo on 12/20/24, 10:43 AM with 47 comments
by jumploops on 12/23/24, 4:17 AM
I did a pass of the codebase and it seems they’re just forking processes?
It’s unclear to me where the safety guarantees come from (compared to using e.g. KVM).
Edit: it appears the safety guarantees come from libriscv[0]. As far as I can tell, these sandboxes are essentially RISC-V programs running in an isolated context (“machine”) where all the Linux syscalls are emulated and thus “safe.” Still curious what potential attack vectors may exist?
[0] https://github.com/libriscv/libriscv/tree/dfb7c85d01f01cb38f...
by EgoIncarnate on 12/23/24, 6:58 AM
Staring emphermial hypervisor VMs quickly is more noteworthy (since they are often slow to start) than an emulator VM where it's expected to be fast since it's usually not much more than setting up a datastructure and executing a call to an interpreter. I clicked hoping for the former, only to find out the project is the latter.
by ilaksh on 12/23/24, 7:20 AM
Hetzner is really cheap but not sure about the cost effectiveness for the dedicated servers. Actually I think what I saw was that I couldn't get the one I wanted in a US datacenter.
by mdaniel on 12/23/24, 2:21 AM
by rollcat on 12/23/24, 9:03 AM
- The VM has to be built in a safe and performant language (like Rust, Go, or - if careful - modern C++), and available as a library to integrate with the rest of the game. However I don't trust myself to write safe C/C++ (the game is being prototyped in LÖVE/Lua).
- Each VM instance needs a tight execution/instruction budget, to avoid stalling the server's main update loop; e.g. a timer/virtual "hardware interrupt", or simply counting cycles, or even something modelled after eBPF. The total number of VM instances running in a single game would also need to be limited somehow (e.g. making a key component scarce and/or non-renewable, or dividing the total instruction budget across all VMs, or requiring a player to be present in a nearby world chunk).
Use cases are something like redstone in Minecraft: curious and technically-inclined players could build contraptions, like auto-farming crops, pranks/traps, defences, fancy gates/moats, etc. Not the core of the gameplay, but rather one aspect of it, for the curious to explore, learn, have fun with.
There are many off-the-shelf VMs that do RISC-V or similar ISAs, and I'm considering picking one of those, but wondering if a RISC instruction set isn't too low-level for such a thing. On the other hand, it would be nice if the knowledge would be directly transferrable to the real world.
Anyone tried to build something similar and can share their experience?
by elmigranto on 12/23/24, 2:39 PM
> The test program is a simple […] return string
I understand how this is required to measure the effects of sandboxing in isolation. And the result is impressive.
In what ways would you expect performance to be affected when workloads are more realistic as well?
by childintime on 12/23/24, 3:57 PM
Is there any cloud that provides RISC-V VM's, coupled with SQLite access for persistence?
by thornewolf on 12/23/24, 2:23 AM
by mattclarkdotnet on 12/23/24, 6:38 AM
by owenthejumper on 12/23/24, 1:02 PM
by kjok on 12/23/24, 1:07 AM
by pyaamb on 12/23/24, 1:10 AM