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: <20071010184450.GA20718@kroah.com>
Date:	Wed, 10 Oct 2007 11:44:50 -0700
From:	Greg KH <greg@...ah.com>
To:	Martin Bligh <mbligh@...igh.org>
Cc:	Tejun Heo <htejun@...il.com>, ebiederm@...ssion.com,
	cornelia.huck@...ibm.com, stern@...land.harvard.edu,
	kay.sievers@...y.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCHSET 3/4] sysfs: divorce sysfs from kobject and driver
	model

On Wed, Oct 10, 2007 at 11:26:32AM -0700, Martin Bligh wrote:
> Greg KH wrote:
>> On Wed, Oct 10, 2007 at 10:24:43AM -0700, Martin Bligh wrote:
>>>> The rules for sysfs files are the following:
>>>> 	- one value, in text format, per file.
>>>> 	- no action apon open/close
>>>> 	- binary files are only allowed for "pass-through" type files
>>>> 	  that the kernel does not touch (like for firmware and pci
>>>> 	  config space)
>>>> 	- directories should be associated with a kobject where it makes
>>>> 	  sense (no nesting deep subdirectories without a kobject
>>>> 	  present)
>>>> 	- when a directory is created/removed, a uevent should happen
>>>> 	  declaring what type of device was created/removed.
>>> So you'll be removing:
>>>
>>> /sys/devices/system/node/node?/meminfo
>>>
>>> then?
>>>
>>> along with:
>>>
>>> /sys/devices/system/node/node?/distance
>>> /sys/devices/system/node/node?/numastat
>>>
>>> and all the other things that violate the rules?
>> I would love to do that :)
>> And that goes to show how trying to enforce these kinds of rules is damm
>> hard.  Things slip by that I never notice because they are only for odd
>> types of hardware :)
>
> Is there no way to enforce that in the sysfs interface?
> (Haven't looked, I'll admit).

Hm, we could parse the buffer from the response and complain if we
notice spaces in it :)

>>> (which I do agree with ... I just don't think sysfs works for
>>> performance stats as we've discussed several times before ;-))
>> I agree that this doesn't work too, but also that if it's really needed,
>> it can be done, just let us know about it (like
>> /sys/block/BLOCKDEV/stat)
>
> OK. Would be nice if we could get rid of /sys/devices/system at
> some point, which seems like a fairly crazy path, but still ;-)

I agree, getting rid of the sysdev stuff is on the list of things I want
to see changed, that code is not nice...

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