Live data from Hacker News

Fuchsia: a new operating system

lwn.net

121–130 of 324 posts

Re: Fuchsia: a new operating system

#121

Earlier quoted context omitted.

Roughly put: in a capability based system, if you have a valid handle for a service, then you can use that service. But the only way you can get a valid handle is to ask your parent process for one --- handles are unforgeable. So your parent gets to check that you're legitimate. ...but your parent, in turn, has limited permissions, because the only way it can get a handle is to ask its parent. And when you ask your p…

That's actually really beautifully simple. Thanks for this explanation, it really helped the idea "click"

And for another beautiful convergence: nowadays most software development is done in languages that naturally express capability patterns, namely memory-safe languages. That is, if you have a reference to an object or value, you have the authority to invoke any of the methods on that object or call any functions that accept such a value. So object references are capabilities.

Most such languages only go too far by allowing "ambient authority", whereby any component in your program has the ability to turn a reference to a value that carries little authority, into one that carries significantly more authority. For instance, consider the file open API: you're essentially turning a string, which exposes no unsafe or security-critical methods, into an object that can literally destroy your computer. And literally any library or component you use can open files. It's madness!

To make a memory safe language capability secure, you simply remove all sources of ambient authority. This mainly consists of globals that permits transitive access to mutable state, like file system APIs, global static variables that can reference transitively mutable data, etc.

These insecure APIs are then replaced with equivalent object instances which you can pass around, eg. you can only receive the authority to open a file if you're given an instance to the directory object which contains that file. The entry point of your program would then change to accept various capabilities instead of just string parameters.

Re: Fuchsia: a new operating system

#122
post #9

Earlier quoted context omitted.

I wonder if they intend to keep Flutter as the primary UI toolkit, or if that was just used out of convenience. If this really ends up being an Android & Chrome OS replacement, and a large portion of code being written for it also ran natively on iOS, that'd be fantastic. Maybe even cool enough to get me to use Dart ;)

Is there a reason not to use Flutter? From what I've seen of Flutter it seems like a very competent cross platform UI toolkit. In fact, I wouldn't be surprised if they announced that you can start using Dart/Flutter to write cross platform Android/iOS apps at I/O 2017.

Last year from what I have watched on Dart conference in Munich, Flutter was still very much WIP, not sure how much it has progressed since then.

Re: Fuchsia: a new operating system

#123
post #22

That whole handle idea of the 'capability' system, but especially its implementation with 'handles', sounds exactly like Win32 to me. I haven't looked at the source, can anyone confirm or explain what exactly is different?

I'm no Windows expert, so I didn't know that windows handles were used as security primitives. I thought they were just a bit like file-descriptors or X11 window ids, or indeed pointers. Such handles do have a kind of role in authorization: once a process has convinced the system to give it some resource, then the (handle, processid) pair is all the system needs to check access. However you typically gain the handle…

> Namespaces are really useful, and are probably here to stay. But as long as things can be accessed by names, the access will need to be controlled by something like an ACL.

Not necessarily. If your system supports first-class namespaces, then you can just build a namespace consisting of only the objects to which a program should have access. No need for any further access control.

A file open dialog from a program is simply the program's request for you to map a file into its namespace.

Re: Fuchsia: a new operating system

#124

Earlier quoted context omitted.

Is there a reason not to use Flutter? From what I've seen of Flutter it seems like a very competent cross platform UI toolkit. In fact, I wouldn't be surprised if they announced that you can start using Dart/Flutter to write cross platform Android/iOS apps at I/O 2017.

(disclaimer: I work on the Flutter team.) You can use Flutter today to write an app that runs on iOS and Android. :)

How is it in turns of speed?

On one hand, the website says that it's compiled to native code (so it can be same speed/faster than Java), but on the other hand, it's based on a soft-type language, which makes optimization difficult (even with V8, JS is still slower than native code).

Side question:

I understand that Dart was soft-typed because it was supposed to replace/compile to JS, but what advantage does soft-types have against "implied-types" (like auto or go's := ) combined with operator overloading (to allow string+int, for example)?

Re: Fuchsia: a new operating system

#125

People that question the existence of Fuchsia need only remember why Chrome was created. A lot of people thought Google was wasting their time by building a browser, including Eric Schmidt, and look how that turned out. Now, I'm not saying that Fuchsia will have the same success as Chrome, but it's clear that they think that having an OS that they can control the direction of is important to them.

ChromeOS is only a major success in the US schools, I am yet to see someone use it here in Europe.

Re: Fuchsia: a new operating system

#126
post #7

While this is a cool project, I can't really see it making financial sense... > Lets throw away the last 20 years development on the linux kernel by thousands of people, and rewrite our own. > How much will it cost? > Ooh - I dunno - If you lend me 1000 engineers, we should be done in about 10 years, cos we're really smart and don't need to implement legacy SCSI support...

Pretty cheap if it ends up saving the Android ecosystem. Android is maybe using 10% of the functionality in the linux kernel but is paying all the overhead and friction of maintaining a branch for each and every device. I think google wants to heavily encapsulate the hardware vendors drivers and customizations and provide a stable API so google can pretty much update devices with on its own without much interaction w…

What will be with custom ROMs?

Right now you can bootstrap a ROM because the manufacturer has to OS their kernel (GPL).

Now, with the kernel being proprietary, getting a custom ROM will probably be as hard as getting android to work on iPod.

Re: Fuchsia: a new operating system

#127

I've been waiting for this to be released. I suppose everyone has been. Capabilities . Like fine grain locks, these are very powerful and very hard to get right. That's the lesson from Hydra, the 432, .... No, it's not a hard mechanism for the microkernel to get right; it's a hard policy for the application programmer to get right. However, that's probably more of an opportunity rather than meant as a criticism. Our…

>C++. Oh lord. Why are you writing a microkernel in C++? If there was anything they learned from L4 (Xen, Linux, ...) it is that C is sufficient. Why do you want to implement something small with something that is large? This one is a real head scratcher.

Because if there was anything proven from years and years of using C, it's that it is woefully insecure and should not be trusted to write a kernel with.

You can still fuck up with C++, sure, but std::shared_ptr offers more guarantees than *.

EDIT: HN stop eating my stars

Re: Fuchsia: a new operating system

#128

I don't understand what the value is in writing a new original microkernel from scratch in this day and age when sel4* is free and open source, performance tuned for 20ish years, is security hardened, and is provably correct for both security and features? This doesn't seem like a wise path to take. * See http://sel4.systems/

No kidding. All kinds of robust operating system design went into seL4. It's simply crazy not to make use of it.

I can see potential problems already from looking at the Magenta kernel docs. For instance, they say that all syscalls are non-blocking except for explicit wait and sleep calls, which means the kernel is very likely vulnerable to various DoS attacks, which aren't a problem for L4 kernels.

Re: Fuchsia: a new operating system

#130
post #62

Earlier quoted context omitted.

Eh. The biggest thing Linux had going for it in terms of winning market share was running on commodity x86 parts in a time period when the commercial Unices weren't touching it, and x86 made really strong gains in beating everybody else at performance per dollar.

> The biggest thing Linux had going for it in terms of winning market share was running on commodity x86 parts in a time period when the commercial Unices weren't touching it From the 1980s to 1993 there were: v7 ports: Microsoft Xenix (later became SCO), Venix, Coherent System III ports: PC/IX (later 386/ix) SVR3 ports: official Intel, ESIX from Everex SVR4 ports: Dell UNIX, Novell UnixWare, Microport

Also AIX (ran for some time on PS/2 machines), NeXTSTEP (3.1+ ran on PCs)... The list is, actually, quite extensive.
Post reply on HN