Off-topic: D-Bus in the kernel

Alban Crequy alban.crequy at
Thu Sep 16 03:25:45 PDT 2010

Le Thu, 16 Sep 2010 07:37:33 +0300,
"Rémi Denis-Courmont" <remi at> a écrit :

>    Hello,
> On Thursday 16 September 2010, Soh Kam Yung wrote:
> > Just spotted this interesting post about putting d-bus in the
> > kernel
> > [ ]
> Unfortunately, the D-Bus bus is too feature-bloated to be implemented
> in kernel. For one thing, routing messages will be no fun, the kernel
> would have to parse and keep track of the AddMatch requests.

It is not conditional or future: the prototype does parse match rules
in the kernel and keep track of them with very similar data structures
to dbus-daemon (but using rb tree and lists from the kernel instead of
DBusHash and DBusList).

> Arguably, a kernel-space D- Bus should implement signal subscription
> out-of-band (compare to the IP multicast ioctl()s). But then it's not
> really the D-Bus protocol anymore.

I kept the same D-Bus protocol in the prototype.

> Feature negotiation will also make a kernel implementation more
> difficult. It means more messages to parse and more state to keep in
> kernel.

Which feature negotiation do you refer to?

> But I expect the worst part of a kernel D-Bus to be the security
> enforcement. Parsing files in kernel space is a complete non-starter,
> and that includes service files. So it might be possible to move the
> session bus to kernel space, but I am not very optimistic about the
> system bus. Hmm, anyone for dbustables and NetFilter-DBus?

Indeed. Nothing is decided for the security policy. There are still
design choices to do! Looking into NetFilter is my next step.

> Also, this article contains some highly suspicious inaccuracies.
> skb_clone() does not copy message buffers, only buffer heads.

I didn't say skb_clone copies the message buffers but the opposite
actually: the message buffer is copied exactly one time and the buffer
heads are copied as many time as there is recipients by using

My first version did copy the buffers several times, but then I
understood how to use skb_clone() correctly and fixed it.

Is there other inaccuracies or something unclear?


More information about the dbus mailing list