News for hackers. Stuff that matters.
Re:Robigalia: seL4 and Rust by duaneb on Wednesday January 06, 2016 @05:02PM (#10854163)
I think I missed the correctness proof for the rust compiler and runtime.
Re:Robigalia: seL4 and Rust by wyldfire on Wednesday January 06, 2016 @06:12PM (#10854670)
pcwalton said a correctness proof of the type system is in-progress [1].

[1] https://news.ycombinator.com/item?id=7601944

Re:Robigalia: seL4 and Rust by pcwalton on Wednesday January 06, 2016 @07:36PM (#10855095)
It is. But that will still only prove whether the type system can correctly prevent memory safety problems. As many security people correctly point out, memory safety doesn't guarantee security of the programs you write in Rust. seL4 has a stronger security proof that can guarantee not only that seL4 doesn't have (for example) use-after-frees but that it also actually works right (for a formally-specified notion of "works right").

The reason you'd want to combine seL4 with Rust is to give confidence that (a) the core part of the system (microkernel) works right and that (b) the less core parts of the system (drivers, libc) are least free from nasty memory safety problems. To a first approximation, it's a compromise between a project like the OS in the "Writing an OS in Rust" series, which guarantees memory safety but doesn't guarantee that any part of the system actually does the right thing, and a hypothetical fully formally-verified OS, which is (with current technology) something that would be way too expensive and time-consuming to be practical.

Re:Robigalia: seL4 and Rust by nickpsecurity on Thursday January 07, 2016 @01:10AM (#10856303)
Great explanation!
Re:Robigalia: seL4 and Rust by nickpsecurity on Wednesday January 06, 2016 @05:53PM (#10854532)
Exactly. It's same reason high assurance requires source-to-object code traceability even for SPARK Ada. Of course, it's nice the tooling helps with that. Rust needs same thing plus either proven or zero runtime target. Unless it has it already.
Re:Robigalia: seL4 and Rust by cmrx64 on Wednesday January 06, 2016 @06:10PM (#10854658)
I have plans slated for doing proofs about Rust programs in 2017, if not sooner (I'm interning at Data61 on the seL4 verification team starting in two weeks, and if I don't get a chance to work on Rust verification then, I'll start after I'm done)
Re:Robigalia: seL4 and Rust by nickpsecurity on Wednesday January 06, 2016 @10:08PM (#10855711)
Oh hell, you going to be working with the top talent. You might learn some high assurance skills after all. That makes your project 2x as interesting. Good luck on the new job. :)
Re:Robigalia: seL4 and Rust by kibwen on Wednesday January 06, 2016 @06:12PM (#10854671)
Rust has long been capable of running without a runtime (that's how all OS development in Rust is expected to operate) and formal verification of the language spec is ongoing (though full verification is still probably years out, and who knows if the compiler will ever be formally verified).
Re:Robigalia: seL4 and Rust by nickpsecurity on Wednesday January 06, 2016 @10:06PM (#10855707)
Hell yeah! Appreciate the updates. My idea there was a runtime or overhead came from an early OS attempt in Rust where they couldnt get past real mode. Had to use non-Rust code for that and it was using too much space IIRC. They've gotten past those obstacles now?
Re:Robigalia: seL4 and Rust by steveklabnik on Wednesday January 06, 2016 @10:40PM (#10855815)
You need about 100 lines of assembly to get to a Rust kmain in long mode.

Rust has effectively no runtime these days. Same amount as C or C++, basically.

Re:Robigalia: seL4 and Rust by nickpsecurity on Wednesday January 06, 2016 @11:02PM (#10855890)
That's great to hear. Thanks for chiming in with the good info as always.
Re:Robigalia: seL4 and Rust by steveklabnik on Wednesday January 06, 2016 @11:32PM (#10856000)
Any time. If you're interested in what exactly that code is, check out Phil's blog, linked upthread.
Re:Robigalia: seL4 and Rust by nickpsecurity on Thursday January 07, 2016 @01:08AM (#10856297)
I'm guessing you mean this:

http://os.phil-opp.com/entering-longmode.html

Interesting stuff and seems like a good description of the code. Bookmarking it in case I do more in this area.