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: <20100927.153639.212415479.davem@davemloft.net>
Date:	Mon, 27 Sep 2010 15:36:39 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	dipankar@...ibm.com
Cc:	eric.dumazet@...il.com, holt@....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
Subject: Re: When booting a 16TB system, unix_create1 fails due to integer
 overflow.

From: Dipankar Sarma <dipankar@...ibm.com>
Date: Thu, 23 Sep 2010 19:40:37 +0530

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

Is someone following up on integrating this upstream so this thing
gets fixed?

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