Re: [patch] kernel sysfs events layer

Mike Snitzer
2005-07-06T22:05:30Z

So this is a blast from the past but I'd like to understand why
kobject_uevent and kbject_uevent_atomic are EXPORT_SYMBOL_GPL rather
than EXPORT_SYMBOL. During the evoloution from a separate kevents
over netlink (rml, kay, arjan) then folding it in to kobject with
hotplug (kay, greg kh, etc) it went from GPL to not, as listed below
in one of kay's early patches, back to EXPORT_SYMBOL_GPL as it stands
today. At one point Andrew Morton asked Robert Love why the GPL-only
export on the orginal kevent code and Robert said he'd check with
Arjan.. didn't see the answer.

In any case, how is it that all kernel code _should_ be sending events
to userspace? GPL the kernel code in question and use kobject_uevent?
;) It'd be nice if non-GPL kernel code could send events through this
interface too.

please advise, thanks.
Mike

On 9/5/04, Kay Sievers <kay.sievers@vrfy.org> wrote:

> diff -Nru a/kernel/kobject_uevent.c b/kernel/kobject_uevent.c
> --- /dev/null Wed Dec 31 16:00:00 196900
> +++ b/kernel/kobject_uevent.c 2004-09-06 03:47:59 +02:00
<snip>
> +
> +int kobject_uevent(const char *signal, struct kobject *kobj,
> + struct attribute *attr)
> +{
> + return do_kobject_uevent(signal, kobj, attr, GFP_KERNEL);
> +}
> +
> +EXPORT_SYMBOL(kobject_uevent);
> +
> +int kobject_uevent_atomic(const char *signal, struct kobject *kobj,
> + struct attribute *attr)
> +{
> + return do_kobject_uevent(signal, kobj, attr, GFP_ATOMIC);
> +}
> +
> +EXPORT_SYMBOL(kobject_uevent_atomic);
> +