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] [day] [month] [year] [list]
Message-ID: <20101114000345.GA2040@suse.de>
Date:	Sat, 13 Nov 2010 16:03:45 -0800
From:	Greg KH <gregkh@...e.de>
To:	Stefan Achatz <stefan_achatz@....de>
Cc:	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Eric Biederman <ebiederm@...stanetworks.com>,
	"Serge E. Hallyn" <serue@...ibm.com>, Tejun Heo <tj@...nel.org>,
	Jiri Kosina <jkosina@...e.cz>, linux-input@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Benjamin Thery <benjamin.thery@...l.net>
Subject: Re: [PATCH 2/2] HID: roccat: using new sysfs_create_bin_group() in
	kone driver

On Sat, Nov 13, 2010 at 05:34:15PM +0100, Stefan Achatz wrote:
> Am Samstag, den 13.11.2010, 06:39 -0800 schrieb Greg KH:
> > On Fri, Nov 12, 2010 at 10:06:34PM -0800, Dmitry Torokhov wrote:
> > > On Fri, Nov 12, 2010 at 04:52:32PM -0800, Greg KH wrote:
> > > > On Fri, Nov 12, 2010 at 04:21:45PM -0800, Eric Biederman wrote:
> > > > > On Fri, Nov 12, 2010 at 10:18 AM, Stefan Achatz <stefan_achatz@....de> wrote:
> > > > > > hid-roccat-kone now uses new group functions for creating binary
> > > > > > sysfs attributes.
> > > > > 
> > > > > Looking at this, I have a problem with the way this works.
> > > > > You are still doing this the hard and racy way.
> > > > > 
> > > > > sysfs attributes that are only added when we initialize the hardware and
> > > > > are only removed when we remove the driver should use the device layer
> > > > > functions to create their attributes.
> > > > > 
> > > > > This achieves two things.  The code is easier to write because there
> > > > > is less of it.
> > > > > The notification to user space happens after the attributes appear so
> > > > > that you don't
> > > > > have strange hotplug races.
> > > > > 
> > > > > If there a chance you can look at implementing this in the simpler
> > > > > race free way?
> > > > 
> > > > Good point, just attach this attribute group to the device and the
> > > > driver core will automatically create the files for you.
> > > > 
> > > 
> > > Attribute group in device structure is normally owned and managed by
> > > subsystem core; without additional plumbing drivers should not be
> > > touching it, at least not normally.
> > > 
> > > Plus we do not have binary attribute group in device structure [yet].
> > 
> > In thinking about it a bit more, why do you have so many binary
> > attributes for this driver?  binary sysfs files are rare, so adding a
> > binary attribute group pointer to the device or driver would just waste
> > a lot of space that no one else uses.
> > 
> > What are these binary files for?  Who uses them?  I don't seem to be
> > able to find them in the Documentation/ABI directory, or am I missing
> > something here?
> 
> Documentation/ABI/testing/sysfs-driver-hid-roccat-kone

My apologies, that does look correct, thanks for doing it.

Yeah, odds are udev wants to see these files when the device shows up so
we need a way to get them created before the device event is sent out to
userspace.  So we need to get them assigned to the device or driver
somehow like the default attribute groups we have today.  Any ideas are
appreciated.

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