(There are probably other requirements too but that last one is the biggie really.)
(There are probably other requirements too but that last one is the biggie really.)
In the meantime, here's an article I wrote on the /dev/kvm API, including how to drive it directly from a small C program: https://lwn.net/Articles/658511/ (edit: fixed URL)
Why can't we just alias the storage to something different underneath? How is there a "hard" requirement? Unless it's difficult/impossible to make the representation align correctly without the same semantics?
(Though I should caution that it's not as simple as "just write in a safe language" if you're doing the tricks that QEMU does for speed. That's not to say we shouldn't be moving away from C and C++ in general, however--we should.)
Rust is not ready for linux yet.
(no, `curl -sSf https://static.rust-lang.org/rustup.sh | sh` does not count)
Firefox now has Rust code in it, so any distro that compiles from source and has Firefox is gonna end up packaging rustc too.
There is something to be said for replacing C and old C++ code with C++11 and the safer new constructs like std::unique_ptr. It doesn't stop you from doing unsafe things but it makes it much easier not to, without requiring a complete rewrite.
In fact, I'm even skeptical of the claim that unique_ptr provides significant security benefits over malloc and free. Leaks aren't the kinds of security problems we're talking about here.
Low level coders were using straight Assembly.
I find ironic to see such statements about 40 years later.
What other safe C subsets/variants are out there which are actively being worked on?
Cyclone and bit-c interested me greatly so pointers would be appreciated.
> Cyclone was an early attempt to create a programming language at the level of C, combining manual memory management with complete static memory safety. You can think of it as one step on the path that Rust and other languages have continued, one that I believe will eventually replace C, eliminating a host of severe security problems.
Still have to force or pay them to do it as the C zeal is so strong. Yet, the smaller the adjustment, the more likely the uptake. Worked for C and Java vs others that clean-slated things.
https://www.cs.rutgers.edu/~santosh.nagarakatte/softbound/
http://sva.cs.illinois.edu/downloads.html
http://dslab.epfl.ch/proj/cpi/
Paper mentioning several of the safe C's, including those like Vault you can't have:
https://pdfs.semanticscholar.org/a890/a850dc78e65e26f8f4def4...
Galois, as usual, graciously open-sourced two of theirs (Ivory & Tower) that's already fielded in real world:
Popcorn and TALC are older ones in prototype form:
https://www.cs.cornell.edu/talc/releases.html
Someone here showed me this one I haven't evaluated but is used in compiler front-end:
https://eigenstate.org/myrddin/
The C0 one used in Verisoft is embedded in vc0compiler-trunk probably. They did great things with it but I haven't been brave enough to try to retrieve it ;).
http://www.verisoft.de/VerisoftRepository.html
So, altogether, what remains is quite scattered and prototype form. Plus, you still have to rewrite the software. So, I've mostly been recommending people apply Softbound, SAFECode, and CPI to their code just to see what happens. If it still works and fast enough, then just use it as it covers most bases. Also, contributing to those three's codebase is a very, wise move with potentially large impact.