Live data from Hacker News

MotorOS: a Rust-first operating system for x64 VMs

github.com

21–30 of 125 posts

Re: MotorOS: a Rust-first operating system for x64 VMs

#21
post #10

Earlier quoted context omitted.

It is fascinating how despite the thousands and thousands of high profile memory related RCE vulnerabilities, how this community doesn't seem to like pointing the fact that C is an unsafe language.

Rust is only “safe” because by default you’re not allowed to do certain things. If you applied those same limitations to C it would be just as if not more safe. And the things you’re not allowed to do in “safe” Rust is required in various applications that C excels at, meaning that for Rust to do the same it has to be “unsafe”.

Nobody has ever denied that unsafe Rust code exists, so I don't know why people keep acting like it's some gotcha that invalidates the value of Rust. The point is that in Rust, it is clearly delimited where those unsafe operations are occurring, so you can focus on making sure those specific parts of your code are solid. In C, you have to be vigilant about your entire code base, not just a handful of blocks. Moreover, most Rust programs don't need to use unsafe at all, so those authors can rest easier.

Re: MotorOS: a Rust-first operating system for x64 VMs

#23
post #10

Earlier quoted context omitted.

It is fascinating how despite the thousands and thousands of high profile memory related RCE vulnerabilities, how this community doesn't seem to like pointing the fact that C is an unsafe language.

Rust is only “safe” because by default you’re not allowed to do certain things. If you applied those same limitations to C it would be just as if not more safe. And the things you’re not allowed to do in “safe” Rust is required in various applications that C excels at, meaning that for Rust to do the same it has to be “unsafe”.

I am usually the first to say that Rust evangelists are annoying, but… your argument isn’t valid. That any tool can be dangerous when used wrongly enough is not an argument in favor of or against rust. Additionally, that any given tool might be better for a certain job over any other isn’t an argument for or against other tools more generally.

Re: MotorOS: a Rust-first operating system for x64 VMs

#24

[flagged]

It is an accurate statement.

Linux is a monolithic UNIX-like OS, with all the implications of an accidental design that dates to the late 60s/early 70s.

For starters, it has huge (Linux has MLoCs) TCB. And it is very trusted (undeservedly so) code, as it runs with supervisor privileges.

One bug in these MLoCs is all it takes.

There are far better system architectures out there.

Re: MotorOS: a Rust-first operating system for x64 VMs

#25
post #10

Earlier quoted context omitted.

It is fascinating how despite the thousands and thousands of high profile memory related RCE vulnerabilities, how this community doesn't seem to like pointing the fact that C is an unsafe language.

Keep in mind the other important difference for this project which is a microkernel design with most operations running in isolated user space processes/libraries. That also helps limit the ability to exploit vulnerabilities in one place to take over other parts of the system.

Not just the other important, but the most important.

A safety-friendly language can help, but the system architecture is most important.

Re: MotorOS: a Rust-first operating system for x64 VMs

#26
post #10
post #4

Earlier quoted context omitted.

[flagged]

It is fascinating how despite the thousands and thousands of high profile memory related RCE vulnerabilities, how this community doesn't seem to like pointing the fact that C is an unsafe language.

>pointing the fact that C is an unsafe language.

The implication there is that Rust is safe.

Reality is, it is not.

Rust provides some tools C does not, which can help in writing safe programs. That is about it.

In exchange, it is a relatively young language with all it implies. For instance, there are not yet any successful OSs written in Rust.

Kudos to the authors for actually writing code to change this, instead of evangelizing Rust on HN.

Re: MotorOS: a Rust-first operating system for x64 VMs

#28
post #14

Earlier quoted context omitted.

I think it’s a shock when compared with the insecurity of Windows also forgetting that that was the reality on the ground in the 90s and that Windows also had a larger share. Windows has since hardened their security model and could be a more secure out of the box experience than Linux (eg shipping with TPM and FDE set up correctly). But yeah, there’s plenty of things you’d do differently if you wanted to properly se…

I think you are confusing Linux the Kernel with Linux-based operating systems. The original quote from the README was referencing the kernel and made no comparison to Windows or the NT kernel.

The Linux kernel and distributions is what I’m talking about so yes compared with NT kernel and windows as a distribution.

The design choices you’d make to build a secure OS (kernel and user space) looks very different. The microkernel design is a more secure design but techniques to make it work fast took a very long time to develop (+ computer HW also got fast enough that the overhead is no longer as big of a deal + we have multithreading everywhere that microkernel can sometimes exploit more naturally).

Re: MotorOS: a Rust-first operating system for x64 VMs

#29
post #26
post #10

Earlier quoted context omitted.

It is fascinating how despite the thousands and thousands of high profile memory related RCE vulnerabilities, how this community doesn't seem to like pointing the fact that C is an unsafe language.

>pointing the fact that C is an unsafe language. The implication there is that Rust is safe. Reality is, it is not. Rust provides some tools C does not, which can help in writing safe programs. That is about it. In exchange, it is a relatively young language with all it implies. For instance, there are not yet any successful OSs written in Rust. Kudos to the authors for actually writing code to change this, instead o…

> For instance, there are not yet any successful OSs written in Rust.

The rate at which new successful OS's come about is extremely low. Despite that, at least one OS in rust is being successfully deployed commercially today ('hubris', thanks to oxide computing), there are numerous reasonably advanced 'amateur' OS projects in rust (redox os being a reasonably polished example), and rust has begun finding it's way into the two most popular existing OSes (both the linux and windows kernels - I believe the windows kernel is farther along here).

By any reasonable metric, rust has been wildly successful in the OS writing space. No doubt, in large part thanks to evangelizing by people who said "this is a reasonable thing to do".

Re: MotorOS: a Rust-first operating system for x64 VMs

#30
One thing I keep hoping to see in all of these kernels in Rust is an async first kernel. Is there something that makes this particularly difficult or do folks not see the value in it? I know from following along with Phil Oppermann’s OS in Rust series that is definitely possible, but these last few OS’ in Rust seem to not be attempting this, https://os.phil-opp.com/async-await/
Post reply on HN