From: Bodo Eggert <7eggert@gmx.de>
To: Jeff Layton <jlayton@redhat.com>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
dada1@cosmosbay.com, dev@openvz.org
Subject: Re: [PATCH 2/2] make pipefs do lazy i_ino assignment and hashing
Date: Tue, 30 Jan 2007 17:31:16 +0100 [thread overview]
Message-ID: <E1HBvt7-00018P-1c@be1.lrz> (raw)
In-Reply-To: 7J3fA-Tk-11@gated-at.bofh.it
Jeff Layton <jlayton@redhat.com> wrote:
> This patch updates pipefs to do defer assigning an i_ino value to its inodes
> until someone actually tries to stat it. This allows us to have unique i_ino
> values for the inodes here, without the performance impact for anyone who
> doesn't actually care about it.
>
> Since we don't have an i_ino value at pipe creation time, we need something
> else to stuff into the dentry name. Here, I'm using the pointer address of
> the inode xor'ed with a random value. There are certainly better hashing
> schemes, so if someone wants to propose a better way to do this, then I'm
> open to looking at it (maybe halfmd4?).
Why XOR? To pretend a non-existent level of security?
Either you can't use the address, or you can read the obfusicator value, too.
OTOH, if sizeof(void*) <= sieof(ino_t), using the address will result in a
unique inode number without need for expensive hashing algorithms.
--
Why did the hacker cross the road? To get to the other side.
Why did the cracker cross the road? To get what was on the other side.
The difference is small, but important.
-- Gandalf Parker
next parent reply other threads:[~2007-01-30 16:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <7J3fA-Tk-11@gated-at.bofh.it>
2007-01-30 16:31 ` Bodo Eggert [this message]
2007-01-30 15:38 [PATCH 2/2] make pipefs do lazy i_ino assignment and hashing Jeff Layton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1HBvt7-00018P-1c@be1.lrz \
--to=7eggert@gmx.de \
--cc=dada1@cosmosbay.com \
--cc=dev@openvz.org \
--cc=jlayton@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).