From: Dave Kleikamp Subject: Re: [RFC][PATCH] ensure i_ino uniqueness in filesystems without permanent inode numbers (via pointer conversion) Date: Fri, 17 Nov 2006 09:26:46 -0600 Message-ID: <1163777206.17280.30.camel@kleikamp.austin.ibm.com> References: <1163770980.13410.39.camel@dantu.rdu.redhat.com> <20061117142435.GC18567@parisc-linux.org> <1163774903.13410.68.camel@dantu.rdu.redhat.com> <1163775685.17280.13.camel@kleikamp.austin.ibm.com> <1163776015.13410.71.camel@dantu.rdu.redhat.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: Matthew Wilcox , linux-fsdevel@vger.kernel.org Return-path: Received: from e1.ny.us.ibm.com ([32.97.182.141]:20456 "EHLO e1.ny.us.ibm.com") by vger.kernel.org with ESMTP id S1755731AbWKQP0t (ORCPT ); Fri, 17 Nov 2006 10:26:49 -0500 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e1.ny.us.ibm.com (8.13.8/8.12.11) with ESMTP id kAHFQl7l013360 for ; Fri, 17 Nov 2006 10:26:47 -0500 Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay02.pok.ibm.com (8.13.6/8.13.6/NCO v8.1.1) with ESMTP id kAHFQlLD288170 for ; Fri, 17 Nov 2006 10:26:47 -0500 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id kAHFQltT003112 for ; Fri, 17 Nov 2006 10:26:47 -0500 To: Jeff Layton In-Reply-To: <1163776015.13410.71.camel@dantu.rdu.redhat.com> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Fri, 2006-11-17 at 10:06 -0500, Jeff Layton wrote: > On Fri, 2006-11-17 at 09:01 -0600, Dave Kleikamp wrote: > > > Wouldn't you only be able to only crack a few of the low-order bits due > > to a cluster of inodes being sequential? I don't think you'd be able > > crack enough of it to be useful. You may be able to determine where > > some inodes are relative to others, but I don't think you'd be able to > > point the their location in memory. I don't know anything about crypto, > > so I could be wrong. > > > > On a 64-bit kernel, that would be the case. On a 32-bit kernel, there > are no high order bits to chop off, so this would effectively give you > the address. By a few of the low-order bits, I mean very few, not 32. The slab allocator generally allocates one page at a time, so you typically don't get more than about 6 inodes in a slab page. Even if you consider that you may be able allocate several slab pages together, it would be hard to get very many contiguous pages of inode slab cache. Even if it were possible to force the system to allocate around 256 contiguous inodes, you would still only be able to determine 8 bits out of 32. At most one or two more if you could determine a pattern of inode numbers that would be skipped due to the inclusion of struct inode within the fs-dependent inode structure. I may be wrong, but I doubt that someone could determine the entire mask from the observed i_ino's. Shaggy -- David Kleikamp IBM Linux Technology Center