3 ms·
The key for such a project being successful would be to set expectations low in defining what success was. Something like "a proof of concept of an experiment
by delhanty 9y ago
The key for such a project being successful would be to set expectations low in defining what success was. Something like "a proof of concept of an experiment to rewrite small amounts of the Linux kernel in Rust".
One would fork Linux on GitHub, name it something other than Linux, and just have the existing branches track Linux.
Linus has stated that he isn't particularly interested in security bugs. Other people take a different view. Eg. [1], [2]
Another incremental step to improved security in Linux after a Rust fork might be to take the lessons learned to create a conservative set of Rust inspired extensions to C without all the hoariness of C++.
[1] https://news.ycombinator.com/item?id=2539839 https://news.ycombinator.com/item?id=2539839
[2] https://www.schneier.com/blog/archives/2015/11/linus_torvalds_.html https://www.schneier.com/blog/archives/2015/11/linus_torvald...
edit 1: removed apparently dead link to original source http://lkml.org/lkml/2008/7/15/296 http://lkml.org/lkml/2008/7/15/296
edit 2: clarify that one wouldn't use the name Linux for the fork
- nickpsecurity 9y ago"One would fork Linux on GitHub, name it something other than Linux, and just have the existing branches track Linux" That's already hard given how many commits go into Linux. One must always remember it's not just some volunteer project: most of the commits are by paid programmers working at companies. That's where the labor comes from. You'd need a lot of volunteers to keep up with the paid programmers. Even Linux itself couldn't achieve that. Hence, all the paid programmers working on it. "might be to take the lessons learned to create a conservative set of Rust inspired extensions to C without all the hoariness of C++." Now you're thinking on the right track. That sort of thing has been done multiple times at the compiler level where they automagically make C safe with a performance hit. Several teams did it at CPU level. These projects have been used on FreeBSD mostly but also Linux. The strongest one so far is CheriBSD on CHERI processor. Alternatively, for a safer C that you're manually using, what you describe has already been designed and actually inspired Rust's safety model: https://en.wikipedia.org/wiki/Cyclone_(programming_language) https://en.wikipedia.org/wiki/Cyclone_(programming_language) It could be revived and improved if people wanted. It got nowhere with C programmers, though, in the past.
- delhanty 9y agoSo we agree about something at least ;-) Slight tangent: I started my programming career in 1989. The product was Parasolid and the language was AGA - a C inspired language that preceded C++. I vaguely remember the following extensions: * built in logging with Undo * overloaded operators leading to vector and interval types that worked better than C++ * a proper module system
- nickpsecurity 9y agoInteresting. Never heard of it. The main safe language from that time was Ada. It's been updated regularly. The neat thing about it is how it was systematically designed to mitigate errors in about every operation. http://www.adacore.com/knowledge/technical-papers/safe-and-secure-software-an-invitation-to-ada-2012/ http://www.adacore.com/knowledge/technical-papers/safe-and-s... There's also a variant called SPARK that can automatically prove the absence of errors like buffer overflow in a way that would normally take a theorem prover. https://en.wikipedia.org/wiki/SPARK_(programming_language) https://en.wikipedia.org/wiki/SPARK_(programming_language)
- delhanty 9y ago>Interesting. Never heard of it. You wouldn't of. It was developed internally to write Parasolid. Probably they still use it - several of the original devs are still there 30 years later.
- nickpsecurity 9y agoIBM did that with PL/S. It was a system version of PL/I with no runtime and ability to decide how a function was compiled via annotations in that function. Kept getting updated but no public release. Here's a few more that you might find interesting for general usage that were proprietary or started internal: http://www.semdesigns.com/Products/Parlanse/index.html http://www.semdesigns.com/Products/Parlanse/index.html https://web.archive.org/web/20130303055647/http://www.foundationdb.com:80/white-papers/flow/ https://web.archive.org/web/20130303055647/http://www.founda... https://en.wikipedia.org/wiki/Pike_(programming_language) https://en.wikipedia.org/wiki/Pike_(programming_language) https://en.wikipedia.org/wiki/Roxen_(web_server) https://en.wikipedia.org/wiki/Roxen_(web_server) Parlanse is used in Semantic Designs' powerful toolkit. Flow was used to make a Spanner competitor, FoundationDB, that was good enough in some way for Apple to buy & pull off the market. Pike was used to build Roxen server that had significant advantages in its time period. A number of companies also used LISP and REBOL for their advantages with at least one asking LispWorks to do a real-time implementation for telecom or something. So, usually it pays to go with a common, often-crappy language with its ecosystem. However, doing one's own language with competitive edge does pay off at times. I think these days one can just do a DSL in Racket or Haskell on top of main language to negate benefits of totally rolling own stuff. People got far with it, though. Galois is on a roll with that in high-assurance systems with this as an example: https://ivorylang.org/ivory-introduction.html https://ivorylang.org/ivory-introduction.html So, just some fun examples of homebrew for you in return. :)