netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* qlcnic binary sysfs file abuse
@ 2013-07-07  0:29 Greg KH
  2013-07-25 19:37 ` Sony Chacko
  0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2013-07-07  0:29 UTC (permalink / raw)
  To: Rajesh Borundia, Shahed Shaikh, Jitendra Kalsaria, Sony Chacko,
	linux-driver
  Cc: netdev, linux-kernel

Hi all,

I was doing a kernel-wide audit on all of the binary sysfs files, and
noticed a metric ton of them in the qlcnic driver.

The rules about binary sysfs files are that they can not be touched by
the kernel at all, they are "pass-through" directly to the hardware, and
it seems that this driver is not doing that properly.

It also seems that almost all of these files are merely "debugging"
files, but as I can't seem to find the relevant Documentation/ABI/
documentation for them, I can't be sure.

So, any objection to me just deleting these entirely?  Or, if they
really are needed, can I just move them to debugfs, which is where I
think they should have been from the beginning?

Oh, and I'm pretty sure that the creation of these is totally racy, so I
really doubt that anyone is using them otherwise they would have noticed
this already.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: qlcnic binary sysfs file abuse
  2013-07-07  0:29 qlcnic binary sysfs file abuse Greg KH
@ 2013-07-25 19:37 ` Sony Chacko
  2013-07-25 20:08   ` Greg KH
  2013-07-25 21:09   ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Sony Chacko @ 2013-07-25 19:37 UTC (permalink / raw)
  To: Greg KH, Rajesh Borundia, Shahed Shaikh, Jitendra Kalsaria,
	Dept-Eng Linux Driver
  Cc: netdev, linux-kernel

> -----Original Message-----
> From: Greg KH [mailto:gregkh@linuxfoundation.org]
> Sent: Saturday, July 06, 2013 5:30 PM
> To: Rajesh Borundia; Shahed Shaikh; Jitendra Kalsaria; Sony Chacko; Dept-Eng
> Linux Driver
> Cc: netdev; linux-kernel
> Subject: qlcnic binary sysfs file abuse
> 
> I was doing a kernel-wide audit on all of the binary sysfs files, and noticed a
> metric ton of them in the qlcnic driver.
> 
> So, any objection to me just deleting these entirely?  Or, if they really are
> needed, can I just move them to debugfs, which is where I think they should
> have been from the beginning?

Some applications are using these files, please move them to debugfs.

Thanks,
Sony

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: qlcnic binary sysfs file abuse
  2013-07-25 19:37 ` Sony Chacko
@ 2013-07-25 20:08   ` Greg KH
  2013-07-25 21:09   ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: Greg KH @ 2013-07-25 20:08 UTC (permalink / raw)
  To: Sony Chacko
  Cc: Rajesh Borundia, Shahed Shaikh, Jitendra Kalsaria,
	Dept-Eng Linux Driver, netdev, linux-kernel

On Thu, Jul 25, 2013 at 07:37:46PM +0000, Sony Chacko wrote:
> > -----Original Message-----
> > From: Greg KH [mailto:gregkh@linuxfoundation.org]
> > Sent: Saturday, July 06, 2013 5:30 PM
> > To: Rajesh Borundia; Shahed Shaikh; Jitendra Kalsaria; Sony Chacko; Dept-Eng
> > Linux Driver
> > Cc: netdev; linux-kernel
> > Subject: qlcnic binary sysfs file abuse
> > 
> > I was doing a kernel-wide audit on all of the binary sysfs files, and noticed a
> > metric ton of them in the qlcnic driver.
> > 
> > So, any objection to me just deleting these entirely?  Or, if they really are
> > needed, can I just move them to debugfs, which is where I think they should
> > have been from the beginning?
> 
> Some applications are using these files, please move them to debugfs.

What applications care about the internal data structures of the kernel
driver?  What can those applications do with that information?  What
happens when you have a 64bit kernel on a 32bit userspace?  How about
endian issues on different processor types?  That sounds like a
nightmare to even consider getting correct...

Anyway, I'll move them to debugfs, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: qlcnic binary sysfs file abuse
  2013-07-25 19:37 ` Sony Chacko
  2013-07-25 20:08   ` Greg KH
@ 2013-07-25 21:09   ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2013-07-25 21:09 UTC (permalink / raw)
  To: sony.chacko
  Cc: gregkh, rajesh.borundia, shahed.shaikh, jitendra.kalsaria,
	Linux-Driver, netdev, linux-kernel

From: Sony Chacko <sony.chacko@qlogic.com>
Date: Thu, 25 Jul 2013 19:37:46 +0000

>> -----Original Message-----
>> From: Greg KH [mailto:gregkh@linuxfoundation.org]
>> Sent: Saturday, July 06, 2013 5:30 PM
>> To: Rajesh Borundia; Shahed Shaikh; Jitendra Kalsaria; Sony Chacko; Dept-Eng
>> Linux Driver
>> Cc: netdev; linux-kernel
>> Subject: qlcnic binary sysfs file abuse
>> 
>> I was doing a kernel-wide audit on all of the binary sysfs files, and noticed a
>> metric ton of them in the qlcnic driver.
>> 
>> So, any objection to me just deleting these entirely?  Or, if they really are
>> needed, can I just move them to debugfs, which is where I think they should
>> have been from the beginning?
> 
> Some applications are using these files, please move them to debugfs.

This is quite a mess, and I've complained about all of the crazy
files created by qlcnic in the past.

debugfs is for things that do not create a ABI which the kernel has to
maintain forever.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-07-25 21:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-07  0:29 qlcnic binary sysfs file abuse Greg KH
2013-07-25 19:37 ` Sony Chacko
2013-07-25 20:08   ` Greg KH
2013-07-25 21:09   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).