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: <200706221746.03298.rob@landley.net>
Date:	Fri, 22 Jun 2007 17:46:02 -0400
From:	Rob Landley <rob@...dley.net>
To:	Greg KH <greg@...ah.com>
Cc:	linux-kernel@...r.kernel.org, Kay Sievers <kay.sievers@...y.org>
Subject: Re: Rules on how to use sysfs in userspace programs

On Friday 08 June 2007 16:36:37 Greg KH wrote:
> Over time there have been a number of problems when sysfs has changed in
> "unexpected" ways.  Here's a document that Kay wrote a while ago that
> I'd like to add to the kernel Documentation directory to help userspace
> programmers out.
>
> Any comments or critique of this is greatly appreciated.

Still catching up from my laptop dying.

I find the explanation of /sys/subsystem almost unintelligible.  What will the 
new one actually look like?

If I want to find all block devices in the system, it looks like I should now 
look at /sys/subsystem/block.  (And "subsystem" is not a variable here but 
the actual directory name?  I presume it moved for Feng Shui reasons.)  

If I want to find char devices, where do I look?  /sys/subsystem...  char?  
class?  Is a char device now anything under /sys/subsystem that is _not_ 
in /sys/subsystem/block?  (Minus bus devices?)  Is there a specific directory 
for these?

This document is highly polluted with what NOT to do.  I'm looking for a 
clear "what SHOULD I do", and it takes some wading to find it.  (Historical 
cruft about what not to do is potentially a separate document, it's not 
useful for people learning this stuff now who weren't playing with the legacy 
mechanisms.)  The description of /sys/subsystem spends so much time talking 
about old legacy issues it never gives a clear description of the new way of 
doing things, which is theoretically what this document is about...

Rob
-- 
"One of my most productive days was throwing away 1000 lines of code."
  - Ken Thompson.
-
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