6 ms·
indeed, the ideas could be used more widely. fil-c runs on linux. what if linux ran on fil-c?
by cypherpunk666 2mo ago
indeed, the ideas could be used more widely.
fil-c runs on linux.
what if linux ran on fil-c?
- yjftsjthsd-h 2mo agoI was under the impression that fil-c's memory management (gc?) wouldn't work on a kernel? Be sweet if you could, ofc
- brabel 2mo agoThis is a myth that seems to never die. OS kernels can and have been written in GC languages. Watch the video maybe? The whole presentation was running on a distro fully compiled with FillC.
- yjftsjthsd-h 2mo agoThe video has a slide which says, > I'm running on an OS where the entire userland is compiled with Fil-C/C++ (emphasis mine) Looking up https://fil-c.org/pizlix https://fil-c.org/pizlix , that says, > The kernel is compiled with Yolo-C. So that you can compile the kernel, a copy of GCC is installed in /yolo/bin/gcc. Where do you see anything saying the Linux (the kernel) can be built with Fil-C?
- brabel 2mo agoOk, I stand corrected: only the kernel userland was compiled with Fil-C. However, I don't see why the full Linux kernel could not be compiled with Fil-C. It would be nice if Fil himself could explain what limitations there are, but the documentation does not list missing C/C++ features as far as I know, it only says it's "fanatically compatible" which I take to mean mostly everything should work?! But to my point in general, here's a osdev.org wiki explaining how high level languages can and have been used for OS development (with the caveat that some Assembly code is required, which I believe is also true of kernels written in C): https://wiki.osdev.org/Languages https://wiki.osdev.org/Languages
- doctorpangloss 2mo agowhat if fil-c could draw pelicans?
- josephg 2mo agoDo you want your kernel to be 2x slower and use 4x as much memory?
- wavemode 2mo agoA computer spends the vast majority of its time and memory in userspace, so this tradeoff isn't as bad as it sounds.
- josephg 2mo agoThe benefit also isn’t as big as you might expect. Most of Linux’s recently found security vulnerabilities were due to ToC/ToU bugs. Fil-C would not magically fix these problems. It would sometimes be a good trade off, for some users. But I don’t think many regular users would choose to pay this cost.
- cypherpunk666 2mo agoa fun exercise is to ask an LLM how it might be applied.
- avadodin 2mo agoYou can run your Fil–C userland on provably–secure seL4. (Left as an exercise for the reader)
- josephg 2mo agoIf you’re using SeL4, userland processes are already strictly sandboxed. There’s still some benefit to Fil-C, since the added memory safety would make it much more difficult to take over a process. But the blast radius of a compromised program in SeL4 is much smaller because of the capability model.