Compatibility between D-Bus and kdbus
mzqohf at 0pointer.de
Tue Nov 25 08:25:54 PST 2014
On Tue, 25.11.14 11:08, Simon McVittie (simon.mcvittie at collabora.co.uk) wrote:
> > This might be a problem. Right now, QtDBus assumes that any match rule it adds
> > will be handled successfully. If the resource limit is low enough that an
> > application could hit it, we'll need to start handling the failure case.
> Yes, and that's hard; GDBus doesn't handle this either. On the other
> hand, at least kdbus adds match rules via a synchronous ioctl rather
> than an async message.
Are you sure? I thought it was async in gdbus... sd-bus currently adds
them all in sync mode, and I actually have a todo list item to make
this async, taking inspiration from gdbus. Syncing on AddMatch is
actually really slow, given that there are so many involved.
> Somewhere else (in this thread? on the Google Code project?) I suggested
> adding an ioctl for "atomically replace this bloom filter with this
> bloom filter", which would let a binding consolidate two similar match
> rules A and B into a broader rule, say A|B|C, without needing to worry
> about exceeding the limit again. Pseudocode:
> add match rule D
> catch resource limit exceeded:
> find two sufficiently similar match rules A and B
> atomically replace A with A|B|C
> remove B
> retry adding D
If figure you mean:
It appears to be implemented.
> > org.freedesktop.DBus.GetId
> Possible gap?
It's communicated in the HELLO ioctl struct when you connect. A client
should cache it.
Lennart Poettering, Red Hat
More information about the dbus