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]
Message-ID: <s5hmw52fvgb.wl-tiwai@suse.de>
Date:	Wed, 28 Jan 2015 22:26:28 +0100
From:	Takashi Iwai <tiwai@...e.de>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/2] Add device_create_files() and device_remove_files() helpers

At Wed, 28 Jan 2015 13:05:47 -0800,
Greg Kroah-Hartman wrote:
> 
> On Wed, Jan 28, 2015 at 09:46:12PM +0100, Takashi Iwai wrote:
> > Hi,
> > 
> > this is a simple patch to add device_create_files() and
> > device_remove_files() to replace multiple device_create_file() or
> > _remove() calls with a single shot with the device_attr list.
> > 
> > It's basically just a clean up, but also helps to simplify the error
> > handling a lot in many existing codes since the function itself does
> > rollback at error.
> > 
> > The series contains a patch to apply these to drivers/base/node.c.
> > I have lots of patches (up to 30) to use these in the whole tree, but
> > maybe it'd be easier too apply once after this stuff is merged at
> > first.  It's just a cleanup so no urgent task, after all.
> 
> I'd like to some day be able to drop device_create_file entirely, as it
> is almost always used in a racy way (but not always, so we can't get rid
> of it today.)
> 
> A driver should be using an attribute group and be created/registered
> with it if they want any files associated with it, so giving people the
> ability to add large numbers of files all at once seems like the wrong
> thing to do :)

Well, through the glance over many codes using device_create_file(),
I think the problem of the attribute group is that there is little
help for generating the entries dynamically.  For example, if you have
two groups you want to enable conditionally, what would be the best
way to implement?

I don't mean that my device_create_files() is best, but to me it looks
like that proper tools are still missing.


thanks,

Takashi
--
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