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: <87lk8lflzf.fsf@szonett.ki.iif.hu>
Date:	Mon, 26 Nov 2007 09:29:40 +0100
From:	Wagner Ferenc <wferi@...f.hu>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: bonding sysfs output

Andrew Morton <akpm@...ux-foundation.org> writes:

> On Sun, 25 Nov 2007 16:12:57 +0100 Wagner Ferenc <wferi@...f.hu> wrote:
>
>> I propose it as a fix for trailing NULs and spaces like eg.
>> 
>> $ od -c /sys/class/net/bond0/bonding/slaves 
>> 0000000   e   t   h   -   l   e   f   t       e   t   h   -   r   i   g
>> 0000020   h   t      \n  \0
>> 0000025
>> 
>> I'm afraid there're other problems with "++more++" handling, but let's
>> not consider those just yet.  Find the patch attached.  The first
>> hunks also renames buffer to buf, for consistency's shake.
>> 
>> The original version had varying behaviour for Not Applicable cases.
>> This patch also settles for empty files (not even a line feed) in
>> those cases, but I'm not sure about the general policy on this matter.
>
> hm, there are a lot of changes there.  Were they all actually needed to fix
> the one bug which you have described?

Trailing NULs are present in each file under /sys/class/net/*/bonding
and also in /sys/class/net/bonding_masters.  That is, in every file
provided by drivers/net/bonding/bond_sysfs.c.  Most of the patch is
concerned with this.

Closely related is the presence of trailing spaces in multivalue
files.  There are three such files, one of them has the trailing space
removed.  This patch removes it from the other two.  During this it
also renames one function argument 'buffer' to 'buf', for consistency.

On the policy side: some files are not applicable to some types of
bonds, and return a single linefeed in that case.  Except for one
single case, which returns 'NA\n'.  The patch changes these cases into
emtpy files.

If these are worthy changes, I'm absolutely willing to split up the
patch into three parts as the above.
-- 
Thanks,
Feri.
-
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