Off-topic: D-Bus in the kernel

Marcel Holtmann marcel at
Fri Sep 17 20:45:08 PDT 2010

Hi Remi,

> > > > So I could test a full GNOME session (and also N900) with AF_DBUS
> > > > without implementing the bus driver in the kernel.
> > > 
> > > So this puts the session bus in the kernel?
> > 
> > It depends what is in /etc/dbus-1/{session,system}.conf. If there is:
> >   <listen>unix:tmpdir=/tmp</listen>
> > it uses the usual AF_UNIX sockets. If I change it to:
> >   <listen>dbus:path=/tmp/kdbus</listen>
> > then it use AF_DBUS sockets with kdbus.
> I expect such an abomination to be burnt in flames on the kernel mailing list. 
> There is no file "type" for DBus bus, so you simply cannot use the file system 
> for this - only Unix/local domain sockets are allowed to sit there. Anything 
> else will break stat() semantics, in my understanding.

correct. Using path= is wrong. The sockaddr_dbus struct should be
properly defined. Essentially just some like type=session and uuid=...
or something should be enough.

> You should really consider using something else for the sockaddr. It can be as 
> simple as an unique integer automatically assigned when listen() gets called, 
> fetched with getsockname(). As an added bonus, it becomes trivial to start 
> DBus early in the boot.

Actually the kernel should just start the system bus. No reason to wait
for userspace. That way we can remove all needed magic handling in init
daemons like systemd. The D-Bus system bus is just present and always
present as long as the kernel is running.

These days we do have the problem of dbus-daemon crashing and no
application is capable of handling this. That would be once and for all
solved with the kernel just handling the system bus.

Death of the system bus is fatal for every modern Linux system these



More information about the dbus mailing list