News for hackers. Stuff that matters.
Re:Operating System Development in Rust by Animats on Sunday January 11, 2015 @09:42PM (#8872253)
Somewhere in this direction lies the post-C era. The post-buffer-overflow era. And do we need it.

It has been 6 days since the last CERT advisory for a buffer overflow security hole.

Re:Operating System Development in Rust by pjmlp on Monday January 12, 2015 @02:16AM (#8872817)
I am with you on that.

However, if Rust doesn't get adopted by an OS vendor in their SDK, it will join the ranks of Object Pascal, Extended Pascal, Modula-2, Modula-3, Ada, Oberon,Cyclone, ATS.

This just to mention the alternatives on my lifetime, while ignoring the Algol and PL/I variants that existed before C was even born.

Re:Operating System Development in Rust by illumen on Monday January 12, 2015 @04:29AM (#8873053)
Mozilla is an OS vendor.
Re:Operating System Development in Rust by pjmlp on Monday January 12, 2015 @04:59AM (#8873103)
Yes, so are there any plans to use Rust on Firefox OS, as well as, to provide a Rust based SDK?
Re:Operating System Development in Rust by Svip on Monday January 12, 2015 @05:33AM (#8873168)
I assume Servo would likely power Firefox OS's front end, at least once it is ready.
Re:Operating System Development in Rust by pjmlp on Monday January 12, 2015 @07:37AM (#8873543)
Servo is a user space application, though.

My point was about Rust real use case, systems programming.

Re:Operating System Development in Rust by duaneb on Monday January 12, 2015 @10:46AM (#8874461)
A) Some systems programming is in user space.

B) A browser is about the beefiest user space program of which I can think at the moment.

Re:Operating System Development in Rust by sp332 on Monday January 12, 2015 @11:25AM (#8874731)
To be very clear: Servo is a research project. It is not aimed to replace Gecko. http://paulrouget.com/e/servo/
Re:Operating System Development in Rust by smosher_ on Monday January 12, 2015 @06:33AM (#8873350)
I'm not sure how having an official OS SDK helps all that much if they also ship a C or C++ SDK. Anyone could write and maintain one for Rust, so what's the difference?
Re:Operating System Development in Rust by pjmlp on Monday January 12, 2015 @07:36AM (#8873538)
First class treatment on the SDK tooling and APIs.

Of course, the expectation would be that the said OS vendor would give more emphasis to Rust.

For example, C++ earned its place by being bundled alongside C compilers and having things like CORBA, OpenDOC and Windows pushing for it.

> Anyone could write and maintain one for Rust, so what's the difference?

This is how the alternatives to C and C++ faded away of the IT market. The vendors could not keep up with the tools that the OS vendors had on their SDKs and many developers got fed up with writing FFI code.

Re:Operating System Development in Rust by smosher_ on Monday January 12, 2015 @12:27PM (#8875091)
Sorry this is so long, I deleted many paragraphs.

Something about this doesn't sound right to me. I think the third-party factors are overwhelming. After all, the basic I/O and other low-level stuff is going to be there on any supported OS. But availability of compilers/VMs/interpreters, and good libraries for GL, Qt, audio, etc. are all at the top of my reasons for not going with a particular language that would otherwise be suited to the task.

I think Rust is in a better position than one would normally expect. People are looking at it for web dev, and web devs tolerate more diversity in their language of choice. The existence of Go, and the frequent (if misguided) comparisons to Go helps, since writing a web-facing app in Go is a sensible thing. I'm not sure if that will work out, but if it does I think it's a trump card. No web language ever died, except things like Cold Fusion and languages that were superseded by offerings from their own vendors.

On the other hand, I think Rust is better suited to game development. I don't know of Carmack being sweet on Rust in particular, but a few years ago he did start talking about how it would be nice if id could use safer languages (though his biggest complaint was about script writing.) More to the point, Rust is growing a collection of gamedev libraries. Piston is ambitiously trying to curate an entire ecosystem. This is a rare phenomenon among the pretenders. Piston is in no shape to take over the world today, but if it continues to grow and polish it could turn a number of heads.

Re:Operating System Development in Rust by fulafel on Monday January 12, 2015 @08:32AM (#8873759)
Some of those languages have been the main app and system programming language on platforms where the OS is also written in that language. Oberon and the Modulas at least.
Re:Operating System Development in Rust by pjmlp on Monday January 12, 2015 @09:15AM (#8873921)
Yes, but they suffered the fate of being tied to OSes that failed to be adopted, so they went along with them.

I am a big fan of Wirth's languages.

Re:Operating System Development in Rust by userbinator on Sunday January 11, 2015 @10:08PM (#8872327)
The era of unrootable devices, unbreakable DRM, and inescapable walled gardens? Considering that this will basically be "trusted computing done right", I'm quite frankly more scared than anything...

I'm not saying that security holes are nothing to worry about, as I am no less irritated by buggy programs than anyone else, but the alternative might be worse.

Re:Operating System Development in Rust by krenoten on Sunday January 11, 2015 @11:12PM (#8872468)
We are past the point where exploits are a cheap, democratic weapon. So it's time to close the holes that governments and organized crime are using against us. It's our responsibility to build systems that provide democratizing power. It's also our responsibility to practice exercising our political power. Politics will be important for however long we are human.
Re:Operating System Development in Rust by jaekwon on Monday January 12, 2015 @12:55AM (#8872684)
As long as I have the choice to disable it, I want trusted computing. For example, I want to be able to run a secure cryptocurrency wallet on a portable device. Also would like to be able to introspect the hardware, even if it's costly and potentially destructive.
Re:Operating System Development in Rust by chii on Monday January 12, 2015 @02:12AM (#8872810)
the problem is that any entity with the resources to create such a device is incentivized to produce one in which you cannot disable the built-in DRM/security. I think such a device could only be made possible under some sort of new law/regulation (like how net neutrality needs to be enacted into law), and i don't foresee how it can realistically happen. Consumer are already very comfortable with locked down devices now - iphone, tivo, even DRM coffee machines, and i don't see any consumer outrage when device makers introduce obstructions in the name of user safety and security.
Re:Operating System Development in Rust by jaekwon on Monday January 12, 2015 @04:19AM (#8873020)
> is incentivized to produce one in which you cannot disable the built-in DRM/security

Why is that? I don't see why this has to be true.

Re:Operating System Development in Rust by chii on Monday January 12, 2015 @06:38AM (#8873365)
producing a freer device means you cannot force a business model that is more profitable. For example, Playstation 3 used to be able to run a version of linux, but as time went by, sony removed that capability - they didn't want non-gamers to buy it and use it in clustered computing. Their business model is to sell the machine at cost (or even, take a loss), and recoup/profit on the game sales.

A device maker which makes completely open machines is going to get out-competed with low-margin knock-offs, or generic branded copies from places like china. This is good for the consumer, but not good for a business's bottom-line. This is why there are very few branded computers these days (at least, desktop). You can count them on your fingers.

Re:Operating System Development in Rust by robin_reala on Monday January 12, 2015 @11:49AM (#8874857)
Not exactly true. Why would Sony have added Linux functionality in the first place?

* Good will among the community

* More familiarity with Cell software development for clusters (although this was behind a VM)

* Import tax savings in certain territories due to the box being classed as a ‘computer’ instead of a ‘games system’.

Which do you think was most important? (hint: it’s the last one) Conversely, when the ability to run Linux was pulled a hypervisor exploit had been discovered. Now the cost equation tipped back the other way. The import tax hit was still there, but the machine had halved in price since launch so that wasn’t as painful. The community had moved away from PS3 clusters as they weren’t energy effective any more: not as painful. The major pain point from removing it was losing the goodwill of the community, but when balanced against the piracy implications they made their decision.

Personally I think they should have patched the hypervisor holes and kept the functionality, but you can see why they decided to remove it.

Re:Operating System Development in Rust by lloeki on Monday January 12, 2015 @03:41AM (#8872951)
Another example: had Apple not removed the TPM from its computers and used it for the firmware crypto checks, the Thunderstrike exploit would have faced quite a hurdle. Such a delicate balance.
Re:Operating System Development in Rust by pgeorgi on Monday January 12, 2015 @04:05AM (#8872997)
TPM wouldn't have helped any since it's a passive component. As long as you get to overwrite the code faster (or more persistently) than it can check itself (with or without support from TPM), you win.
Re:Operating System Development in Rust by tatterdemalion on Sunday January 11, 2015 @10:20PM (#8872350)
Restrictions placed on Turing machines by their producers are ultimately a political problem and not a technical one. We will indeed have to solve it one day once those restrictions are not buggy.
Re:Operating System Development in Rust by userbinator on Monday January 12, 2015 @11:08AM (#8874630)
It is a political problem, but I think it's one that has to be solved very very soon, because the majority of the population seem to acquiesce quickly to these new restrictions and "safer" (against them) systems without thinking much of the negative aspects. To let it reach the point when freedom is completely associated with malware, terrorism, or whatever else is used to frighten the population into comformity, it may be too late to oppose.
Re:Operating System Development in Rust by randallsquared on Monday January 12, 2015 @11:17AM (#8874680)
In general, technical problems can be permanently solved, and political problems cannot be. Where possible, it's always preferable to turn a political problem into a technical problem.
Re:Operating System Development in Rust by higherpurpose on Sunday January 11, 2015 @11:58PM (#8872581)
Security holes shouldn't be the solution, but pressure on OEMs to allow control over your own devices.
Re:Operating System Development in Rust by zxcdw on Monday January 12, 2015 @12:23AM (#8872625)
I agree. But I'm also convinced that in practice there's absolutely no way to pressure OEMs to allow control over our devices in such way that it would lead to persistent computational opennes and freedom.

Walled gardens and eroded digital/computational liberties are here to stay, and even more so in the future. The trend has been that "hacking the device" has become harder and harder, and devices have became more and more closed and controlled. I don't expect this trend to change any time soon. I sure as hell wish it did, but why would it?

Re:Operating System Development in Rust by vertex-four on Monday January 12, 2015 @02:30AM (#8872834)
Surely, though, if hacking the device was harder - if it wasn't something practically anybody could do with a downloadable tool, for the most part - there'd be more demand for unlockable devices.
Re:Operating System Development in Rust by zak_mc_kracken on Monday January 12, 2015 @01:01AM (#8872694)
Exploits come from both broken languages and human stupidity. We can improve broken languages but don't worry, human stupidity is boundless.
Re:Operating System Development in Rust by userbinator on Monday January 12, 2015 @11:21AM (#8874698)
The trend is to replace "human stupidity" with automated, provable correctness. One of the most obvious examples of this would be array bounds checking. As programmers become increasingly restricted by their own tools in the name of preventing bugs, and as machines effectively write more (correct) code for them, one does have to wonder at some point: "Are we controlling the machines, or are they controlling us?"

We are living in very interesting times indeed...

Re:Operating System Development in Rust by Animats on Sunday January 11, 2015 @11:40PM (#8872534)
I'm thinking more of a VM like Xen in Rust, with the support to run Docker-like containers, with no C or C++ code anywhere. 100% subscript checked down to the hardware level.
Re:Operating System Development in Rust by Elzair on Monday January 12, 2015 @10:38PM (#8877993)
The GPLv3 was designed to counteract this threat. Maybe we should license more stuff under it?
Re:Operating System Development in Rust by naasking on Monday January 12, 2015 @11:27AM (#8874740)
> The era of unrootable devices, unbreakable DRM, and inescapable walled gardens?

No such thing. There is no protection once someone has physical access to the hardware.

Re:Operating System Development in Rust by umanwizard on Thursday January 15, 2015 @11:02AM (#8893202)
Oh really? I guess you'll be releasing your bootloader unlock instructions for my phone any day now, then?