From: Christoph Hellwig <hch@infradead.org>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Christoph Hellwig <hch@infradead.org>, NeilBrown <neilb@suse.de>,
Chuck Lever <chuck.lever@oracle.com>,
linux-nfs@vger.kernel.org, Josef Bacik <josef@toxicpanda.com>,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v2] BTRFS/NFSD: provide more unique inode number for btrfs export
Date: Thu, 2 Sep 2021 08:11:34 +0100 [thread overview]
Message-ID: <YTB5JsW/KLcp10Ef@infradead.org> (raw)
In-Reply-To: <20210901152251.GA6533@fieldses.org>
On Wed, Sep 01, 2021 at 11:22:51AM -0400, J. Bruce Fields wrote:
> It's stronger than "a little more entropy". We know enough about how
> the numbers being XOR'd grow to know that collisions are only going to
> happen in some extreme use cases. (If I understand correctly.)
Do we know that a malicious attacker can't reproduce the collisions?
Because that is the case to worry about.
> > into the inode number is a good enough band aid (and I strongly
> > disagree with that), do it inside btrfs for every place they report
> > the inode number. There is nothing NFS-specific about that.
>
> Neil tried something like that:
>
> https://lore.kernel.org/linux-nfs/162761259105.21659.4838403432058511846@noble.neil.brown.name/
>
> "The patch below, which is just a proof-of-concept, changes
> btrfs to report a uniform st_dev, and different (64bit) st_ino
> in different subvols."
>
> (Though actually you're proposing keeping separate st_dev?)
No, I'm not suggestion to keep a separate st_dev in that case. So the
above scheme looks like the most reasonable (or least unreasonable) of
the approaches I've seen so far. I have to admit I've only noticed it
now given how deep it was hidden in a thread that I only followed bit
while on vacation.
> I looked back through a couple threads to try to understand why we
> couldn't do that (on new filesystems, with a mkfs option to choose new
> or old behavior) and still don't understand. But the threads are long.
>
> There are objections to a new mount option (which seem obviously wrong;
> this should be a persistent feature of the on-disk filesystem).
Yes. Anything like this needs to be persisted. But a mount option
might still be a reasonable way to set that persistent flag.
next prev parent reply other threads:[~2021-09-02 7:12 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <162995209561.7591.4202079352301963089@noble.neil.brown.name>
[not found] ` <162995778427.7591.11743795294299207756@noble.neil.brown.name>
[not found] ` <YSkQ31UTVDtBavOO@infradead.org>
[not found] ` <163010550851.7591.9342822614202739406@noble.neil.brown.name>
[not found] ` <YSnhHl0HDOgg07U5@infradead.org>
[not found] ` <163038594541.7591.11109978693705593957@noble.neil.brown.name>
2021-09-01 7:20 ` [PATCH v2] BTRFS/NFSD: provide more unique inode number for btrfs export Christoph Hellwig
2021-09-01 15:22 ` J. Bruce Fields
2021-09-02 4:14 ` NeilBrown
2021-09-05 16:07 ` J. Bruce Fields
2021-09-06 1:29 ` NeilBrown
2021-09-11 14:12 ` Amir Goldstein
2021-09-13 0:43 ` NeilBrown
2021-09-13 10:04 ` Amir Goldstein
2021-09-13 22:59 ` NeilBrown
2021-09-14 5:45 ` Amir Goldstein
2021-09-20 22:09 ` NeilBrown
2021-09-02 7:11 ` Christoph Hellwig [this message]
2021-09-02 4:06 ` NeilBrown
2021-09-02 7:16 ` Christoph Hellwig
2021-09-02 7:53 ` Miklos Szeredi
2021-09-02 14:16 ` Frank Filz
2021-09-02 23:02 ` NeilBrown
2021-07-27 22:37 [PATCH/RFC 00/11] expose btrfs subvols in mount table correctly NeilBrown
2021-08-13 1:45 ` [PATCH] VFS/BTRFS/NFSD: provide more unique inode number for btrfs export NeilBrown
2021-08-15 7:39 ` Goffredo Baroncelli
2021-08-15 19:35 ` Roman Mamedov
2021-08-15 22:17 ` NeilBrown
2021-08-23 4:05 ` [PATCH v2] BTRFS/NFSD: " NeilBrown
2021-08-23 8:17 ` kernel test robot
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=YTB5JsW/KLcp10Ef@infradead.org \
--to=hch@infradead.org \
--cc=bfields@fieldses.org \
--cc=chuck.lever@oracle.com \
--cc=josef@toxicpanda.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
/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).