Live data from Hacker News

Chrome OS KVM - A component written in Rust

chromium.googlesource.com

91–100 of 109 posts

Re: Chrome OS KVM - A component written in Rust

#91

Earlier quoted context omitted.

Author here: one of the policies we tried to stick to when writing unsafe code was to document each case. It can be tedious but it encourages having less unsafe code and makes the author really think about if this unsafe code is really meeting the same guarantees as safe Rust according to https://doc.rust-lang.org/nomicon/meet-safe-and-unsafe.html

The line above has this: // This is safe since we check the return value. let sock = unsafe { libc::socket(libc::AF_INET, libc::SOCK_DGRAM, 0) }; if sock I think in this case it would be better to put the return value check within the unsafe block, this way the unsafety does not "leak out" of the block, so to speak, so it is easier to audit. Of course in such a trivial case it does not matter much.

I think it's best to keep unsafe blocks as small as possible. Within an unsafe block there is undefined behavior, so you want to get out of there ASAP.

Just my opinion.

Re: Chrome OS KVM - A component written in Rust

#92
post #84
post #74

Earlier quoted context omitted.

Offtopic, but I've always been a bit confused by the notion of "officially sanctioned" at Google... famously it's "Java, C++, Python, Go", but I've never heard anyone mention Javascript, which they obviously must use... or TypeScript (via Angular), or Dart (AdWords and Fuchsia), or C (Google does tons of Linux work), or ObjC/Swift (all their iOS apps). And these are only for projects we know about (if there's no Perl…

I would say any language on the official Google style guide web site. https://google.github.io/styleguide/ All the languages you mention are there.

Theres Common Lisp in there! When did that happen?

Re: Chrome OS KVM - A component written in Rust

#93
post #69

Earlier quoted context omitted.

Speaking as one of the folks in charge of languages: No But we also don't get in the way of teams trying to experiment and see what will work for them. (otherwise, we'd never be able to know what languages to sanction)

I’m on my company’s language group. Do you have any more info on what boundaries are setup for experimental usage of a language? What does the sanctioned/unsanctioned distinction provide if teams can experiment freely?

This would end up a pretty long and detailed discussion and is probably a derail. If you want to discuss it, email me :)

Re: Chrome OS KVM - A component written in Rust

#94
post #69

Earlier quoted context omitted.

I’m on my company’s language group. Do you have any more info on what boundaries are setup for experimental usage of a language? What does the sanctioned/unsanctioned distinction provide if teams can experiment freely?

This would end up a pretty long and detailed discussion and is probably a derail. If you want to discuss it, email me :)

It might be really interesting for those of us on the outside, so if you end up doing it, maybe publish the resulting conversation somewhere as far as possible?

Re: Chrome OS KVM - A component written in Rust

#95

There is a somewhat expanded README that has yet to be reviewed and checked in here: https://chromium.googlesource.com/chromiumos/platform/crosvm...

Solo5/ukvm unikernel monitor co-author here: I've been thinking about rewriting ukvm in Rust off and on for some time now, your work provides a proof point that it can be done. I'll be following it with interest.

Aside: I really like what the ChromeOS team has done over the years to advance the state of OS security for consumers, keep up the good work!

Re: Chrome OS KVM - A component written in Rust

#96

How does this square with rumors from a few days ago that the Pixelbook will be able to run virtualized Windows (or Linux)? I do not understand the implication of "No actual hardware is emulated." If the Pixelbook can run Window or Linux in a VM, then its price slides a little closer towards justifiable.

At least what exists today appears to me aimed at running Linux (or other KVM-aware guests, maybe BSD). I have only briefly read the code.

This may be used as part of running Android apps on ChromeOS in more secure sandboxes, but the Wayland integration suggests to me this might be for running traditional Linux desktop applications on ChromeOS.

I think there's a good chance we'll find out something at the rumored upcoming Pixelbook launch.

Re: Chrome OS KVM - A component written in Rust

#97
post #66

Earlier quoted context omitted.

Crouton is just a chroot to some linux distro. It doesn't use any sort of virtualization.

Could this be a sanctioned way to run linux on a Chromebook w/o dev mode?

The README contains commands that seem to require access to the developer-mode shell. Perhaps in the future though.

Re: Chrome OS KVM - A component written in Rust

#98
post #69

Earlier quoted context omitted.

I’m on my company’s language group. Do you have any more info on what boundaries are setup for experimental usage of a language? What does the sanctioned/unsanctioned distinction provide if teams can experiment freely?

This would end up a pretty long and detailed discussion and is probably a derail. If you want to discuss it, email me :)

I don't see your email address on your profile what's the best way to reach you?

Re: Chrome OS KVM - A component written in Rust

#99
post #98

Earlier quoted context omitted.

This would end up a pretty long and detailed discussion and is probably a derail. If you want to discuss it, email me :)

I don't see your email address on your profile what's the best way to reach you?

dannyb@google

Re: Chrome OS KVM - A component written in Rust

#100
post #84

Earlier quoted context omitted.

I would say any language on the official Google style guide web site. https://google.github.io/styleguide/ All the languages you mention are there.

Theres Common Lisp in there! When did that happen?

When they bougth ITA Software.
Post reply on HN