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]
Date:	Fri, 14 Nov 2008 15:58:35 +1100
From:	Michael Ellerman <michael@...erman.id.au>
To:	Greg KH <greg@...ah.com>
Cc:	linux-kernel@...r.kernel.org, Andrew Morton <akpm@...l.org>,
	viro@...iv.linux.org.uk
Subject: Re: [PATCH] Store the relevant miscdevice in file->private_data in
 misc_open()

On Thu, 2008-11-13 at 19:23 -0800, Greg KH wrote:
> On Fri, Nov 14, 2008 at 01:50:52PM +1100, Michael Ellerman wrote:
> > On Thu, 2008-11-13 at 16:18 -0800, Greg KH wrote:
> > > On Fri, Nov 14, 2008 at 10:54:41AM +1100, Michael Ellerman wrote:
> > > > On Thu, 2008-11-13 at 09:31 -0800, Greg KH wrote: 
> > > > > On Thu, Nov 13, 2008 at 03:49:50PM +1100, Michael Ellerman wrote:
> > > > > > Currently it's not easy to share file_operations between multiple
> > > > > > instances of a miscdevice. In order to do this, the device code needs to
> > > > > > store a list of all it's miscdevice instances, and when fops->open() is
> > > > > > called, search the list and find the right device based on the minor
> > > > > > number.
> > > > > > 
> > > > > > However the generic miscdevice code already has a list of miscdevices,
> > > > > > and uses this to find the right device in misc_open(). If misc_open()
> > > > > > would store the miscdevice it found in file->private_data, then the
> > > > > > device code wouldn't need to worry about storing it's own separate list
> > > > > > and searching that as well.
> > > > > > 
> > > > > > The rest of the miscdevice code does not use file->private_data, so the
> > > > > > device code is still free to use file->private_data for something else
> > > > > > if it wants to.
> > > > > > 
> > > > > > Signed-off-by: Michael Ellerman <michael@...erman.id.au>
> > > > > 
> > > > > Do you have a follow-on patch for some misc device using code that would
> > > > > take advantage of this change?
> > > > 
> > > > Ah, good point. I do, but not for upstream :/
> > > 
> > > Hm, then I have to ask why should we take this change?
> > 
> > Because it's seems like a good idea.
> 
> You know we don't make changes to core code for drivers that aren't in
> the main tree, this is not a new thing...

Sure. I'm not asking you to.

It seemed clear to me that this was a sensible thing for the misc device
infrastructure to do, but if you disagree that's fine.

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

Download attachment "signature.asc" of type "application/pgp-signature" (198 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ