Damus
probono · 5w
Do you think the idea of bringing Mach IPC into the FreeBSD kernel and putting a Darwin based userland on top of it could have some merit? I find it interesting to say the least.
David Chisnall (*Now with 50% more sarcasm!*) profile picture
@nprofile1q...

Stacey Son has a PoC for Mach IPC on FreeBSD. The problem is that Mach IPC is pretty terrible. There is an entire generation of microkernels that were built with the sole design goal of ‘don’t do Mach IPC, it was so bad anything else is better’. NeXTSTEP / OPENSTEP / OS X / macOS / {whatever name it has next year} doesn’t use Mach IPC because it’s a good idea, it uses it because it’s there, same with Mach-O file formats.

The one thing that makes Mach-O useful is that you get a load of trailer information on messages to let you identify the sender. On FreeBSD, SCM_CREDS with ‘ SOCK_SEQPACKET` gives you most of what you want for this and is easily extensible with the rest.

The thing I would like in FreeBSD is Spring-style Doors. Doors were an IPC mechanism that did a synchronous switch to another thread (usually in another process). The kernel preserves most registers (a handful, including the stack pointer and instruction pointer) are switched, which makes easy to do fast RPC, which is what you really want for building compartmentalised software. Doors also had the option to do page flipping for large messages.

Someone did have some patches to add Doors a while ago, but they copied the Solaris APIs without implementing the bits that made Doors good. And a Solaris localisation will look very different from a BSD localisation of the ideas.
1
Adam Shostack :donor: :rebelverified: · 5w
nostr:nprofile1qy2hwumn8ghj7un9d3shjtnyd968gmewwp6kyqpqncxka2nmkqkndk4wkuf3tz3l39z9m8xax3aen3h8tvudwgjmf5mq4uv2v2 nostr:nprofile1qy2hwumn8ghj7un9d3shjtnyd968gmewwp6kyqpqxfzs8vaw2vcd998fn7h6egypa374hy4y523utdc4q7tsgzejgn0qay2j86 Also, launches is better than systemd, but the domains are really confus...