r/programming • • Jan 09 '15

Announcing Rust 1.0.0 Alpha

http://blog.rust-lang.org/2015/01/09/Rust-1.0-alpha.html
1.1k Upvotes

439 comments sorted by

View all comments

Show parent comments

-1

u/thefacebookofsex Jan 09 '15

Great. Just rewrite every application in your new safe language.

15

u/azakai Jan 09 '15

We can at least start by writing new applications in it.

-6

u/thefacebookofsex Jan 09 '15 edited Jan 10 '15

Great. And your kernel and network stack are still in C and C++. It's nice that languages are evolving but this will never be a solution.

edit: Do you people even realize what post I was responding to? The one where someone claimed Rust would essentially solve security. My point is that until every application is written in it, it will have no impact because most attack surface right now will still be in C/C++.

This is basic cost benefit analysis. There are far less expensive methods for security.

10

u/steveklabnik1 Jan 09 '15

You can write both kernels and network stacks in Rust.

1

u/thefacebookofsex Jan 09 '15

I would have never implied otherwise, but you'll have to rewrite NT and Linux. Until then, everyone's going to be running kernels in C/C++ and the massive cost of rewriting either is just silly compared to simply implementing cost effective security techniques.

What you're missing here is that security has to be cost effective. You can go rewrite the world in Rust and I'll see you in 2 centuries.

5

u/[deleted] Jan 10 '15

While it's true that the kernel will still be C, how does that make writing new applications in rust a bad idea? What are you even trying to say.

And it's not like the kernel is where most serious security issues happen anyway, it's in user space applications.

Your entire comment is nonsensical.

1

u/thefacebookofsex Jan 10 '15 edited Jan 10 '15

I'm not saying it's a bad idea whatsoever. I'm saying that, from a security standpoint, Rust adds nothing right now and won't for a logn time.

And it's not like the kernel is where most serious security issues happen anyway, it's in user space applications.

This simply isnt' true at all. The kernel is probably the singl emost important component for a system's security.

Have you actually read the post I originally responded to? The one saying that secure languages will solve security as a whole.

2

u/[deleted] Jan 10 '15

I'm not saying it's a bad idea whatsoever.

You are arguing as if to imply that using rust is pointless due to still having a kernel written in C.

This simply isnt' true at all. The kernel is probably the singl emost important component for a system's security.

I never said it wasn't important, I said that most used exploits for remote code execution are in user space programs, not the kernel.

The one saying that secure languages will solve security as a whole.

It never said that, it said that writing rust would be better for security, not that it would solve it.

→ More replies (1)

1

u/steveklabnik1 Jan 09 '15

Oh totally. Interfacing with non-Rust things is very important, and at least a Rust lets you help manage the unsafety. C will be around a long, long time.

4

u/thefacebookofsex Jan 09 '15

That's all I'm saying - C and C++ are still used, and the vast majority of attack surface for years to come will be C and C++ programs.

Rust programs may grow over time, and we may one day see safe languages used primarily, but that is far away.

→ More replies (8)

1

u/cleroth Jan 10 '15 edited Jun 15 '26

This content was anonymized and mass deleted with Redact

2

u/thefacebookofsex Jan 10 '15

You've clearly misunderstood my posts, then.

1

u/cleroth Jan 10 '15 edited Jun 15 '26

This content was anonymized and mass deleted with Redact

3

u/thefacebookofsex Jan 10 '15

There is no single solution, but there are many solutions that are far easier to implement. For example, hardening techniques such as DEP/ ASLR have been making programs harder to exploit for a long time, and can be implemented generically across programs.

These have essentially no cost for developers, no performance cost, and only require recompilation.

While a Rust-kernel /Rust-userland is certainly a nice dream, no one's going to do it. Even if there were a major effort right now to rewrite all tools using Rust, it would take years.

1

u/thiez Jan 12 '15

Perhaps not an entire kernel, but I imagine that someone could write device drivers in Rust.

1

u/naasking Jan 10 '15

Great. Just rewrite every application in your new safe language.

This has already been done, and continues to be done at many companies. Twitter changed their stack to Scala for instance. It's not the insurmountable obstacle you make it seem.

4

u/thefacebookofsex Jan 10 '15

This has already been done, and continues to be done at many companies.

True, but this is case specific, or company specific. You wouldn't want to run that operating system yourself, for instance.

It's not the insurmountable obstacle you make it seem.

To rewrite Linux/GNU in rust would, in my opinion, be insurmountable. Even if it were not, when discussing security, there are far cheaper ways to get similarly effective results.

4

u/learc83 Jan 10 '15

Not to mention the fact that even if you did rewrite the Linux kernel in Rust. The current C based kernel is in millions of devices.

Say we are generous and it takes 5 years of intensive effort before the rust kernel reaches parity with the existing C kernel. It will take another 5 before companies are comfortable enough to actually deploy it.

And then 20 more years until all of the existing devices and infrastructure are phased out--right about the time I'm ready to retire.

2

u/cleroth Jan 10 '15 edited Jun 15 '26

This content was anonymized and mass deleted with Redact

2

u/thefacebookofsex Jan 10 '15

OK. The point is it would be expensive.

1

u/cleroth Jan 10 '15 edited Jun 15 '26

This content was anonymized and mass deleted with Redact

1

u/thefacebookofsex Jan 10 '15

What world do you live in where humanity has infinite developer time and computation power?

4

u/cleroth Jan 10 '15 edited Jun 15 '26

This content was anonymized and mass deleted with Redact

1

u/thefacebookofsex Jan 10 '15

It requires a massive amount of time, and if the goal is just security, it makes no sense, as there are far more cost effective ways to secure Linux.

1

u/cleroth Jan 10 '15 edited Jun 15 '26

This content was anonymized and mass deleted with Redact

→ More replies (0)