News for hackers. Stuff that matters.
Re:RFC-0082: Runnning unmodified Linux programs on Fuchsia by nousermane on Tuesday August 31, 2021 @03:56AM (#28365043)
There are a few Linux-ABI-compatible platforms already, and have been around for a while:

- Solaris LX-branded zones;

- Microsoft WSL1;

- Google gVisor;

- Amazon Firecracker.

None of above done anything groundbreaking (other than ditching GPL). Why would you think LX-branded Fuchsia would?

Re:RFC-0082: Runnning unmodified Linux programs on Fuchsia by jillesvangurp on Tuesday August 31, 2021 @04:30AM (#28365245)
And that's before you consider things like Docker, which will let you run linux software just about anywhere including windows, mac, BSD, etc. On the desktop we have things like Snaps, Flatpack, etc. Also consider Steam running games made for windows on Arch Linux, and Apple running software compiled for Intel on ARM. Windows 11 will run Android applications apparently. And of course WASM is the next level in portable executables.

The OS as a control point for where software can be installed and used is increasingly less relevant. It's increasingly about controlling the application stores and maximizing their reach rather than the OS platforms. Mobile is actually lagging behind these trends a bit; mostly because of draconian app store policies discouraging/forbidding anything that is "not native".

It will be interesting to see if Fuchsia will get a lot of adoption outside of Google. I'm very skeptical about their ability to convince others to use this. Even their strategy around Fuchsia remains murky. E.g. their whole IOT strategy resembles what they are doing with messaging in terms of quickly abandoned things that they announce with a lot of fanfare every year. One of these train wrecks is Nest, which they picked as a niche player guinea pig for the first commercial rollout of Fuchsia. I doubt it will move the needle for Nest. Or for Fuchsia.

Re:RFC-0082: Runnning unmodified Linux programs on Fuchsia by kwk1 on Tuesday August 31, 2021 @06:24AM (#28366048)
> And that's before you consider things like Docker, which will let you run linux software just about anywhere including windows, mac

Might be worth remarking that (historically, and AFAIK also currently) Docker on Windows and Mac used a Linux VM under the hood.

Re:RFC-0082: Runnning unmodified Linux programs on Fuchsia by jillesvangurp on Tuesday August 31, 2021 @08:00AM (#28366789)
Yes, virtualization allows linux to run efficiently just about anywhere these days.
Re:RFC-0082: Runnning unmodified Linux programs on Fuchsia by pjmlp on Tuesday August 31, 2021 @07:56AM (#28366747)
Docker on Windows uses WSL for Linux binaries and Windows Containers for Windows ones.
Re:RFC-0082: Runnning unmodified Linux programs on Fuchsia by qwerty456127 on Tuesday August 31, 2021 @04:03AM (#28365088)
I don't really know how does it work in Fuchsia but AFAIK it is supposed to implement capability-based access control giving the apps access only to what and when they really are meant to access (rather than everything the user who launched them is eligible to access). I believe constraining native apps written for traditional OSes this way may not be trivial.
Re:RFC-0082: Runnning unmodified Linux programs on Fuchsia by nousermane on Tuesday August 31, 2021 @04:07AM (#28365103)
IIRC, Linux-based Android did that from day 1. Every app runs as different "user" from the kernel perspective.

Plus, you have various [LSM]s as a safety net. Android was an early adopter of SELinux, and latest releases still use it.

[LSM] https://en.wikipedia.org/wiki/Linux_Security_Modules

Re:RFC-0082: Runnning unmodified Linux programs on Fuchsia by roblabla on Tuesday August 31, 2021 @04:36AM (#28365290)
Fuchsia's capabilities mechanism are strictly superior. There has been, over various android version, many fixes to "leaks" of information due to the SELinux configuration not being comprehensive enough, and linux being default open when it comes to capabilities. In contrast, Fuchsia is default closed, so if you don't ask for the permission to do something, you can't.

I distinctly remember ad companies using various tricks like reading /proc and the like to try and get information about what applications are running on a phone and what servers they are communicating with without asking for perms (it's fixed now, but it used to be a thing years ago). This is the kind of stuff that fuchsia should, in theory, prevent.

Re:RFC-0082: Runnning unmodified Linux programs on Fuchsia by snvzz on Tuesday August 31, 2021 @05:52AM (#28365847)
Capabilities are not what you think they are.

Refer to Genode Handbook for a decent definition and examples.

seL4 is formally proven to enforce capabilities.

Re:RFC-0082: Runnning unmodified Linux programs on Fuchsia by qwerty456127 on Tuesday August 31, 2021 @09:57AM (#28368115)
What OSes other than Fuchsia are built on seL4? I'd like to try such an OS on a PC, or a Raspberry Pi or in a VM.
Re:RFC-0082: Runnning unmodified Linux programs on Fuchsia by snvzz on Tuesday August 31, 2021 @05:47PM (#28374111)
Fuchsia is not built on seL4.

Genode is, and should be reasonably easy to test on a regular PC, via bootable usb stick.

It can be quite confusing to use at first, as capabilities have GUI representation.

There's a blog[0] and some introductory video[1].

[0]: https://genodians.org/

[1]: https://youtu.be/vmgWgzeKAjU

Re:RFC-0082: Runnning unmodified Linux programs on Fuchsia by adib on Tuesday August 31, 2021 @04:26AM (#28365216)
Except that Android apps tend to ask for just about all entitlements available. Translation: effectively back to square 1.
Re:RFC-0082: Runnning unmodified Linux programs on Fuchsia by qwerty456127 on Tuesday August 31, 2021 @06:23AM (#28366042)
Yes, this is a huge problem. I wish Google would enforce zero-tolerance policy against apps misusing this mechanism and asking for permissions they don't really need for fulfilling their actual function.
Re:RFC-0082: Runnning unmodified Linux programs on Fuchsia by trasz on Tuesday August 31, 2021 @06:06AM (#28365939)
Capability-based security has been available in FreeBSD for a decade now: https://en.m.wikipedia.org/wiki/Capsicum_(Unix) The real problem at the moment is not the OS, it’s the applications written or modified to use it.
Re:RFC-0082: Runnning unmodified Linux programs on Fuchsia by qwerty456127 on Tuesday August 31, 2021 @09:52AM (#28368053)
> When a process enters capsicum mode,

Can it be forced to?

> it loses all permissions normally associated with its controlling user, with the exception of "capabilities" it already has in the form of file descriptors.

What if we want to grant an app already running a new capability on the fly? E.g. I imagine a case of user opening a file in a GUI app as an OS-level file selection dialog getting invoked (provided the app already has a capability to invoke it, as by the manifest) and producing a capability for the app to access the file the user choosse in an explicitly specified (RO or R/W) mode.

Re:RFC-0082: Runnning unmodified Linux programs on Fuchsia by trasz on Wednesday September 01, 2021 @04:56AM (#28377638)
It cannot be forced to enter, no. It could be executed in capability mode, though, except you would have to give up dynamic linking, for obvious reasons.

As for granting new capabilities - you can pass capabilities from the outside; otherwise the whole mechanism would make no sense :-) In Capsicum case, capabilities are file descriptors, and you pass them the usual way, over Unix sockets.