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: <20100923141037.GA3811@in.ibm.com>
Date:	Thu, 23 Sep 2010 19:40:37 +0530
From:	Dipankar Sarma <dipankar@...ibm.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	Robin Holt <holt@....com>, Al Viro <viro@...iv.linux.org.uk>,
	Benjamin LaHaise <bcrl@...ck.org>,
	"Denis V. Lunev" <den@...nvz.org>, Ingo Molnar <mingo@...e.hu>,
	Miklos Szeredi <mszeredi@...e.cz>,
	Mingming Cao <cmm@...ibm.com>, Nick Piggin <npiggin@...nel.dk>,
	Pavel Emelyanov <xemul@...nvz.org>,
	linux-kernel@...r.kernel.org
Subject: Re: When booting a 16TB system, unix_create1 fails due to integer
 overflow.

On Thu, Sep 23, 2010 at 02:53:04PM +0200, Eric Dumazet wrote:
> Le jeudi 23 septembre 2010 à 07:17 -0500, Robin Holt a écrit : 
> > I do not know which direction to take, but here is the summary of the
> > problem.
> > 
> > We recently started trying to boot a customer's two new machines which
> > are configured with 384GB short of 16TB of memory.
> > 
> > We were seeing a failure which prevented boot.  The kernel was incapable
> > of creating either a named pipe or unix domain socket.  This comes down
> > to a common kernel function called unix_create1() which does:
> > 
> > 	atomic_inc(&unix_nr_socks);
> > 	if (atomic_read(&unix_nr_socks) > 2 * get_max_files())
> > 		goto out;
> > 
> 
> Hi Robin
> 
> I would say : We can use atomic_long_t instead of atomic_t
> 
> And make get_max_files(void) return a long ?
> 
> Something like :
> 
> 
>  fs/file_table.c    |   10 +++++-----
>  include/linux/fs.h |    2 +-
>  net/unix/af_unix.c |   14 +++++++-------
>  3 files changed, 13 insertions(+), 13 deletions(-)
> 
> diff --git a/fs/file_table.c b/fs/file_table.c
> 
>  	n = (mempages * (PAGE_SIZE / 1024)) / 10;
> -	files_stat.max_files = n; 
> +	files_stat.max_files = min(n, 0x7FFFFFFFUL);

It may be cleaner to just convert both the file counters and
the file limits to usnsigned long.

Other than that, this seems like a reasonable thing to do.

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