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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20090928200056.3ed2616a@nehalam>
Date:	Mon, 28 Sep 2009 20:00:56 -0700
From:	Stephen Hemminger <shemminger@...tta.com>
To:	Andy Gospodarek <andy@...yhouse.net>
Cc:	Andy Gospodarek <andy@...yhouse.net>, netdev@...r.kernel.org,
	fubar@...ibm.com, bonding-devel@...ts.sourceforge.net
Subject: Re: [Bonding-devel] [PATCH 4/4] bonding: add sysfs files to display
 tlb and alb hash table contents

On Mon, 28 Sep 2009 21:37:13 -0400
Andy Gospodarek <andy@...yhouse.net> wrote:

> On Mon, Sep 28, 2009 at 05:34:20PM -0700, Stephen Hemminger wrote:
> > On Mon, 28 Sep 2009 20:12:03 -0400
> > Andy Gospodarek <andy@...yhouse.net> wrote:
> > 
> > > On Mon, Sep 28, 2009 at 04:22:37PM -0700, Stephen Hemminger wrote:
> > > > On Fri, 11 Sep 2009 17:13:17 -0400
> > > > Andy Gospodarek <andy@...yhouse.net> wrote:
> > > > 
> > > > > 
> > > > > bonding: add sysfs files to display tlb and alb hash table contents
> > > > > 
> > > > > While debugging some problems with alb (mode 6) bonding I realized that
> > > > > being able to output the contents of both hash tables would be helpful.
> > > > > This is what the output looks like for the two files:
> > > > > 
> > > > > device  load
> > > > > eth1    491
> > > > > eth2    491
> > > > > hash device   last device   tx bytes       load        next previous
> > > > > 2    eth1     eth1          2254           491         0    0
> > > > > 3    eth2     eth2          2744           491         0    0
> > > > > 6             eth2          0              488         0    0
> > > > > 8             eth2          0              461698      0    0
> > > > > 1b            eth2          0              249         0    0
> > > > > eb            eth2          0              21          0    0
> > > > > ff            eth2          0              22          0    0
> > > > > 
> > > > > hash ip_src          ip_dst          mac_dst           slave assign ntt
> > > > > 2    10.0.3.2        10.0.3.11       00:e0:81:71:ee:a9 eth1  1      0
> > > > > 3    10.0.3.2        10.0.3.10       00:e0:81:71:ee:a9 eth2  1      0
> > > > > 8    10.0.3.2        10.0.3.1        00:e0:81:71:ee:a9 eth2  1      0
> > > > > 
> > > > > These were a great help debugging the fixes I have just posted and they
> > > > > might be helpful for others, so I decided to include them in my
> > > > > patchset.
> > > > > 
> > > > > Signed-off-by: Andy Gospodarek <andy@...yhouse.net>
> > > > 
> > > > No.
> > > > 
> > > > Please don't put formatted output in sysfs, it is not meant to be
> > > > used like proc, there is supposed to be only one value per file.
> > > 
> > > Then based on the over 300 files in /sys/ that are more than 1 line on
> > > my currently running kernel, it seems there is significant work to do.
> > > 
> > > Seemingly arbitrary requests like this are extremely annoying when the
> > > current kernel violates them all over the place.
> > > 
> > 
> > The rules are documented in Documentation/sysfs-rules.txt. If you want
> > to change the rules, submit a change to the rules.
> > 
> 
> That specific request is actually in filesystems/sysfs.txt in the
> 'Attributes' section, but the fact that it's actually outlined somewhere
> makes the request seem less 'arbitrary.'  ;-)
> 

Ah, that is where the note is:
----------------------

Attributes
~~~~~~~~~~

Attributes can be exported for kobjects in the form of regular files in
the filesystem. Sysfs forwards file I/O operations to methods defined
for the attributes, providing a means to read and write kernel
attributes.

Attributes should be ASCII text files, preferably with only one value
per file. It is noted that it may not be efficient to contain only one
value per file, so it is socially acceptable to express an array of
values of the same type. 

Mixing types, expressing multiple lines of data, and doing fancy
formatting of data is heavily frowned upon. Doing these things may get
you publically humiliated and your code rewritten without notice.

-- 
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ