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] [thread-next>] [day] [month] [year] [list]
Message-ID: <1285879545.2705.4.camel@edumazet-laptop>
Date:	Thu, 30 Sep 2010 22:45:45 +0200
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Robin Holt <holt@....com>
Cc:	David Miller <davem@...emloft.net>, dipankar@...ibm.com,
	viro@...iv.linux.org.uk, bcrl@...ck.org, den@...nvz.org,
	mingo@...e.hu, mszeredi@...e.cz, cmm@...ibm.com, npiggin@...nel.dk,
	xemul@...nvz.org, linux-kernel@...r.kernel.org,
	netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH V3] fs: allow for more than 2^31 files

Le jeudi 30 septembre 2010 à 15:26 -0500, Robin Holt a écrit :
> On Tue, Sep 28, 2010 at 05:46:51AM +0200, Eric Dumazet wrote:
> > Le lundi 27 septembre 2010 à 15:36 -0700, David Miller a écrit :
> ...
> 
> > Fix is to let /proc/sys/fs/file-nr & /proc/sys/fs/file-max use long
> > integers, and change af_unix to use an atomic_long_t instead of
> > atomic_t.
> > 
> > get_max_files() is changed to return an unsigned long.
> 
> I _THINK_ we actually want get_max_files to return a long and have
> the files_stat_struct definitions be longs.  If we do not have it that
> way, we could theoretically open enough files on a single cpu to make
> get_nr_files return a negative without overflowing max_files.  That,
> of course, would require an insane amount of memory, but I think it is
> technically more correct.
> 

Number of opened file is technically a positive (or null) value, I have
no idea why you want it being signed.

> 
> > --- a/kernel/sysctl.c
> > +++ b/kernel/sysctl.c
> > @@ -1352,16 +1352,16 @@ static struct ctl_table fs_table[] = {
> >  	{
> >  		.procname	= "file-nr",
> >  		.data		= &files_stat,
> > -		.maxlen		= 3*sizeof(int),
> > +		.maxlen		= sizeof(files_stat),
> >  		.mode		= 0444,
> > -		.proc_handler	= proc_nr_files,
> > +		.proc_handler	= proc_doulongvec_minmax,
> 
> With this change, don't we lose the current nr_files value?  I think
> you need proc_nr_files to stay as it was.  If you disagree, we should
> probably eliminate the definitions for proc_nr_files as I don't believe
> they are used anywhere else.
> 

I have no idea why you think I changed something. I only made the value
use 64bit on 64bit arches, so that we are not anymore limited to 2^31
files.



--
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