Unix sockets
Unix sockets
Posted Dec 25, 2024 17:20 UTC (Wed) by bluca (subscriber, #118303)In reply to: Unix sockets by ibukanov
Parent article: Systemd improves image features and adds varlink API
That's because D-Bus _is_ better as an IPC to control system services, if not for the one fatal flaw of not being available in early boot, which is essentially unsolvable without having the IPC primitives in the kernel, which is what kdbus first and bus1 later were trying to do. Unfortunately "the kernel is the wrong place to implement IPC primititves" (or so they said, before merging Binder to which this reasoning doesn't apply, for some reason), so here we are.
The reason Varlink usage can be expanded now is thanks to a particular recent kernel feature, PID FDs. WIth that, it is now possible to reliably identify processes for the purpose of interactive authentication. It just wasn't possible to do so earlier, given PIDs and all other per-process metadata can be trivially spoofed by an unprivileged attacker.
Posted Dec 25, 2024 18:39 UTC (Wed)
by lunaryorn (subscriber, #111088)
[Link] (1 responses)
I can call a varlink service with the Python or Demo standard libraries, or even with nc, jq, and bash, but scripting or glueing anything with DBus is still cumbersome even after all these years.
Perhaps things would be different now if we had gotten kdbus l, but as things stand today I'm more than happy to see a well specified DBus alternative emerge which seems to hit the sweet spot between simplicity for simple use cases while still allowing for incremental complexity for more complicated situations.
Posted Dec 25, 2024 18:40 UTC (Wed)
by lunaryorn (subscriber, #111088)
[Link]
Posted Jan 3, 2025 15:05 UTC (Fri)
by nim-nim (subscriber, #34454)
[Link] (1 responses)
Well then as quotemstr pointed out the correct thing would be to build upon Binder now that it’s merged. I don’t pretend to understand the problem space at your level but I can not parse your logic. If D-Bus is the best solution as an IPC to control system services except for the lack of IPC primitives in the kernel, why should not it be preferred to varlink, now that there are IPC primitives in the kernel. Unless binder is fundamentally flawed as a d-bus underlay ?
Posted Jan 3, 2025 15:20 UTC (Fri)
by bluca (subscriber, #118303)
[Link]
Posted Jan 12, 2025 19:52 UTC (Sun)
by mrugiero (guest, #153040)
[Link]
I seem to recall Binder was there before Bus1 and was simpler in some sense than kdbus? I also remember Torvalds saying if Greg thought it was a good idea then he trusted it or something along those lines? It's quite likely I'm misremembering, but you being one of the interested parties I think you might share some more data about whether I remember right and what happened after that caused Bus1 to stagnate.
Unix sockets
Unix sockets
Unix sockets
Unix sockets
Unix sockets
