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: <4B4C151D.8090903@kernel.org>
Date:	Tue, 12 Jan 2010 15:22:21 +0900
From:	Tejun Heo <tj@...nel.org>
To:	"Eric W. Biederman" <ebiederm@...ssion.com>
CC:	Benjamin LaHaise <bcrl@...et.ca>,
	Greg Kroah-Hartman <gregkh@...e.de>,
	Kay Sievers <kay.sievers@...y.org>,
	linux-kernel@...r.kernel.org,
	Cornelia Huck <cornelia.huck@...ibm.com>,
	linux-fsdevel@...r.kernel.org,
	Eric Dumazet <eric.dumazet@...il.com>,
	Serge Hallyn <serue@...ibm.com>,
	"Eric W. Biederman" <ebiederm@...stanetworks.com>
Subject: Re: [PATCH 3/7] sysfs: Keep an nlink count on sysfs directories.

Hello,

On 01/12/2010 10:06 AM, Eric W. Biederman wrote:
>> 64k is too small.  10 gig interfaces can currently service 50-100k users, 
>> each of which requires their own network device.
> 
> 64k is the point at which I stop returning a userful nlink number to
> userspace, sysfs directories can still scale to any size.
> 
> I could legitimately always return nlink == 1, and all userspace
> utilities that I know of would be fine, but I am trying to be a bit
> more polite than that.

I don't think it's more polite.  It's more error-prone.  64k is a
limit where breach would be rare enough to be unexpected but would
still happen on corner cases.  I don't know what would be the end
result of incorrect nlink but it's far better to have something which
behaves consistently than to have something which flips its meaning
after reaching certain rare but still quite possible limit.  If nlink
is something we can ignore, just set it to 1 for all sysfs files.  If
nlink must be kept correct, use 32bit limit and fail to create more.

> I don't see the link count as interesting enough to store more than
> 16bits for it.  Even with 32bits of storage for nlink sysfs would have
> to have to handle the rollover case as I am doing now.  So I don't
> see any advantage to storing more bits.

I really don't think reiserfs's example is a good one to follow
especially with significantly lowered limit.

Thanks.

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