Kobject_Uevent and DBUS

Kay Sievers kay.sievers@vrfy.org
Sun Jan 9 11:59:44 PST 2005


On Sun, 2005-01-09 at 18:39 +0100, Ikke wrote:
> Hija,
> 
> since linux kernel 2.6.10, there's a new concept introduced into vanilla
> (similar to the patches by RML, ArjanV, Kay Sievers ea) which enables
> the kernel to send out event messages to userspace through a netlink
> socket (check include/linux/kobject_uevent.h and lib/kobject_uevent.c).
> 
> I thought it was useful to send these event messages to the DBUS system
> socket, so applications can pick them up easily, without the need to
> listen to netlink sockets and whatsoever.
> 
> I wrote a little application based on Kay's work which does this. Some
> more information on this is available at [1] and [2].
> 
> Now my question is: would it be a good thing to get this inside the dbus
> daemon itself, code to check the netlink socket and generate dbus
> messages? This would of course be Linux-specific (and should be
> implemented in a way it doesnt interrupt dbus working on other systems),
> but it'd take away the need of one more daemon running.
> 
> The code itself could be fairly easy I think, if you guys think it's a
> good thing to have it inside DBUS, I'll be glad to hack it in and
> provide a patch.
> 
> 
> Please let me know what you think,

I don't think that we should do anything like that. These events are not
generally useful to userspace without the proper context. I think we
should do stuff like that in HAL and not in D-BUS. We already have a
nice kernel device representation in HAL that can interpret the event in
the right context and raise meaningful events from there.

Including kernel messages into D-BUS is breaking the layered
architecture. Low-level stuff like udev will listen directly to the
netlink messages and higher level stuff which is able to use D-BUS
should use HAL instead of listening to raw kernel messages.

Thanks,
Kay



More information about the dbus mailing list