lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 20 Dec 2007 10:04:26 +0100 (CET)
From:	Jan Engelhardt <jengelh@...putergmbh.de>
To:	Greg KH <greg@...ah.com>
cc:	linux-kernel@...r.kernel.org, Kay Sievers <kay.sievers@...y.org>,
	Alan Stern <stern@...land.harvard.edu>,
	Jonathan Corbet <corbet@....net>,
	Randy Dunlap <randy.dunlap@...cle.com>
Subject: Re: [RFC] kobject/kset/ktype documentation and example code updated


On Dec 19 2007 16:30, Greg KH wrote:
>See the example module, samples/kobject/kobject-example.c for an
>implementation of a simple kobject and attributes.

Should mention here that if simple types are enough and a callback
function is not needed, a module_param() could be used instead.

>As a kset contains a kobject within it, it should always be dynamically
>created and never declared statically or on the stack.  To create a new
>kset use:
>  struct kset *kset_create_and_add(char *name,
>				   struct kset_uevent_ops *u,
>				   struct kobject *parent);
Hmm... Not const char *?

>If a kset wishes to control the uevent operations of the kobjects
>associated with it, it can use the struct kset_uevent_ops to handle it:
>
>struct kset_uevent_ops {
>        int (*filter)(struct kset *kset, struct kobject *kobj);
>        const char *(*name)(struct kset *kset, struct kobject *kobj);
>        int (*uevent)(struct kset *kset, struct kobject *kobj,
>                      struct kobj_uevent_env *env);
>};
>
>
>The filter function allows a kset to prevent a uevent from being emitted to
>userspace for a specific kobject.  If the function returns 0, the uevent
>will not be emitted.
>
What about other return values? Should filter perhaps return bool instead?

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ