5 ms·
So starnix is a tool being worked on at Google (in Rust, [1]) to implement Linux's syscall layer and is validated against test cases [2] written for gVisor, als
by uluyol 4y ago
So starnix is a tool being worked on at Google (in Rust, [1]) to implement Linux's syscall layer and is validated against test cases [2] written for gVisor, also a program that implements Linux's syscalls, but one that is instead written in Go [3].
I see NIH is growing even stronger at Google. Why not build on gVisor, rather than re-implement everything from scratch?
[1] https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/src/proc/bin/starnix/ https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/s...
[2] https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/src/proc/bin/starnix/#updating-starnix-when-running-prebuilt-tests https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/s...
[3] https://gvisor.dev/ https://gvisor.dev/
- codemac 4y ago"implementing linux syscalls" ==> a million tools. I'm not sure it's strong logic to re-use something else because it implements linux syscalls, the hard part is what it does after it receives the syscall.
- advisedwang 4y agogvisor is a Google project, this isn't NIH. gVisor provides a linux syscall interface to the guest, but ultimately calls a linux syscalls when it needs to invoke something in the host. That obviously doesn't work for a linux-on-fuschia compat layer. I guess you could re-use the guest side, but if gVisor wasn't written for pluggable backends it's probably more work to do that refactor than just build a separate tool.
- bongobingo1 4y agoFrom the outside looking in, it's seemed that Not Invented by this Team is just as likely a factor as NIH at google.
- iangudger 4y ago> That obviously doesn't work for a linux-on-fuschia compat layer. This isn’t actually true. gVisor contains full implementations of Linux syscalls and only relies on host syscalls being the same for some interoperability features between sandboxed and host applications. It would be completely possible to port gVisor to a non-Linux operating system.
- uluyol 4y agoRight, it would be silly to intercept the syscalls and just pass them on as is to the host kernel. If you just want to validate/filter things for security reasons, there are existing Linux APIs for that.
- raggi 4y agoLong story short: "gVisor uses host-native abstractions, such as threads and memory mappings, to co-operate with the host and enable the same resource model as native containers." When the host isn't Linux...
- deleted 4y ago[deleted]
- wiseowise 4y agoFor starters, gVisor is written in Go, which by design won’t have performance of C++/Rust.
- stickupkid 4y agoCitation required on this one... gVisor is used in a lot of places[1] that require more performance than a clock. I'm not saying you can't achieve more performance with C++/rust, what I'm saying is that this probably isn't the primary concern. 1. https://cloud.google.com/kubernetes-engine/docs/concepts/sandbox-pods https://cloud.google.com/kubernetes-engine/docs/concepts/san...
- jhgg 4y agohttps://www.usenix.org/system/files/hotcloud19-paper-young.pdf https://www.usenix.org/system/files/hotcloud19-paper-young.p...
- staticassertion 4y agohttps://gvisor.dev/docs/architecture_guide/performance/ https://gvisor.dev/docs/architecture_guide/performance/ https://gvisor.dev/docs/architecture_guide/performance/#network https://gvisor.dev/docs/architecture_guide/performance/#netw... Network performance in gvisor is awful and, by gvisor's own documentation, this is a matter of "implementation costs" ie: it is how gvisor is written, not gvisor's fundamental constructs, that makes it slow. The rest of the benchmarks are notable as well, there are a few other places where the implementation is called out as being a problem.
- saurik 4y agoSo maybe they should team up and work on replacing gVisor with something that shares as much code as possible with this new thing, which one would hope would be architected in a way to be able to help replace gVisor?
- staticassertion 4y ago
- staticassertion 4y agogvisor performance is terrible and rewriting it in Rust gives me hope that I can finally use it
- surajrmal 4y agoNote that starnix is not a rewrite of gvisor and in particular will not be portable to non fuchsia systems.
- staticassertion 4y agoBummer
- deleted 4y ago[deleted]
- ksec 4y agoThis isn't NIH. There are links between Silicon Valley, Google, Rust and their ideology.
- iangudger 4y agoI believe this is entirely motivated by this policy: https://fuchsia.dev/fuchsia-src/contribute/governance/policy/programming_languages https://fuchsia.dev/fuchsia-src/contribute/governance/policy...