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:	Mon, 5 Nov 2007 09:11:33 -0800
From:	Greg KH <gregkh@...e.de>
To:	Kay Sievers <kay.sievers@...y.org>
Cc:	Cornelia Huck <cornelia.huck@...ibm.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 34/54] Driver Core: add kobj_attribute handling

On Mon, Nov 05, 2007 at 05:23:32PM +0100, Kay Sievers wrote:
> On Mon, 2007-11-05 at 13:42 +0100, Cornelia Huck wrote:
> > On Fri,  2 Nov 2007 16:59:12 -0700,
> > Greg Kroah-Hartman <gregkh@...e.de> wrote:
> > 
> > > From: Kay Sievers <kay.sievers@...y.org>
> > > 
> > > Add kobj_sysfs_ops to replace subsys_sysfs_ops. There is no
> > > need for special kset operations, we want to be able to use
> > > simple attribute operations at any kobject, not only ksets.
> > > 
> > > The whole concept of any default sysfs attribute operations
> > > will go away with the upcoming removal of subsys_sysfs_ops.
> > > 
> > > Signed-off-by: Kay Sievers <kay.sievers@...y.org>
> > > Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>
> > > ---
> > >  include/linux/kobject.h |   10 ++++++++++
> > >  lib/kobject.c           |   29 +++++++++++++++++++++++++++++
> > >  2 files changed, 39 insertions(+), 0 deletions(-)
> > 
> > How about adding some simple wrappers around the new kobj_attribute
> > structure? This makes the layering clearer.
> 
> > +#define KOBJ_ATTR(_name,_mode,_show,_store)		\
> > +	struct kobj_attribute kobj_attr_##_name =	\
> > +		__ATTR(_name,_mode,_show,_store)
> 
> That sounds fine.
> 
> > +extern int __must_check kobject_create_file(struct kobject *,
> > 
> > 					    struct kobj_attribute *);
> > +extern void kobject_remove_file(struct kobject *,struct kobj_attribute *);
> 
> That should usually be done by default attributes assigned to the ktype.
> Do you have a good use case, where people need to create such attributes
> individually instead?

The s390 code that was converted to use kobj_attributes :)

These look very useful, I'll go add them to the series unless Kay really
objects.

thanks,

greg k-h
-
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