Off-topic: D-Bus in the kernel

Alban Crequy alban.crequy at
Fri Sep 17 09:00:16 PDT 2010

Le Fri, 17 Sep 2010 11:47:28 -0400,
Havoc Pennington <hp at> a écrit :

> Hi,
> On Fri, Sep 17, 2010 at 11:37 AM, Alban Crequy
> <alban.crequy at> wrote:
> >
> > No. It does the minimum parsing required to route the messages
> > (header fields 'sender', 'destination', 'interface', etc.). There
> > is no validation, except a few incomplete ones in the headers of
> > the message.
> >
> OK. You have to set the sender header, for example, to be correct with
> daemon semantics. (This is what I mean about the test suite.)

Yes, it sets the 'sender' header correctly when dbus-daemon is bypassed.
But it is not set when the message is delivered to dbus-daemon (for
D-Bus activation, for the bus driver, or other cases).

> >> How much of the perf gain is due to different
> >> behavior/semantics vs. avoiding the context switch and copies?
> >
> > I don't know, I need to test that. Is there an easy way to disable
> > validation in dbus-daemon?
> Yeah, there is a pretty easy code hack. in
> dbus-message.c:load_message() change the validation mode set at the
> top.
> This still won't disable header _parsing_ though which is itself a lot
> slower than it should be in libdbus. The only performance thing
> libdbus really gets right is that it avoids a lot of gratuitous
> copying of the message.

Thanks for the pointer.


More information about the dbus mailing list