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]
Date:	Tue, 29 May 2007 11:33:14 -0700
From:	Randy Dunlap <randy.dunlap@...cle.com>
To:	"Robert P. J. Day" <rpjday@...dspring.com>
CC:	Andrew Morton <akpm@...ux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Alexander Viro <viro@...iv.linux.org.uk>
Subject: Re: [PATCH] FILESYSTEMS:  Delete unused "int dummy[5]" from inodes_stat_t.

Robert P. J. Day wrote:
> On Tue, 29 May 2007, Randy Dunlap wrote:
> 
>> On Tue, 29 May 2007 14:07:01 -0400 (EDT) Robert P. J. Day wrote:
>>
>>> On Tue, 29 May 2007, Andrew Morton wrote:
>>>
>>>> kernel/sysctl.c:
>>>>
>>>> 	{
>>>> 		.ctl_name	= FS_STATINODE,
>>>> 		.procname	= "inode-state",
>>>> 		.data		= &inodes_stat,
>>>> 		.maxlen		= 7*sizeof(int),    <-----
>>>> 		.mode		= 0444,
>>>> 		.proc_handler	= &proc_dointvec,
>>>> 	},
>>>>
>>>> akpm:/home/akpm> cat /proc/sys/fs/inode-state
>>>> 608039  178454  0       0       0       0       0
>>>>
>>>> So it _is_ used: to present those five zeroes.  I think this is
>>>> for back-compatibility with some cretaceous-era kernel.
>>> ah, gotcha.  well, i'll leave this up to someone else to do
>>> anything with if they are so inclined.
>> There's little to be done, except possibly put a /* comment */ on
>> the struct's dummy line so that we don't go thru this again in N
>> years.
> 
>   so, just to clarify, what *is* the value of those trailing five
> zeroes?  andrew suggests it's to be backward-compatible with an old
> kernel, which doesn't make much sense to me.  it would make more sense
> to say that that's backward-compatible with some old userspace app
> that always wants to see seven values and just ignores the last five.

Agreed, it's for compat with some (unknown) userspace app that reads
/proc/sys/fs/inode-state and scans for 7 (or more than 2) numbers there.
The mantra is "don't break userspace," so we leave the numbers there...

>   in any event, from Documentation/filesystems/proc.txt:
> 
> "inode-state contains two actual numbers and five dummy values. The
> numbers are nr_inodes and nr_free_inodes (in order of appearance)."
> 
> if even the documentation calls them dummy values, do they really have
> any residual value at this point?  and on that note, i'll stop harping
> on this and move on.
> 
> rday


-- 
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
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