From: David Sterba <dsterba@suse.cz>
To: Simon Farnsworth <simon@farnz.org.uk>
Cc: Mark Fasheh <mfasheh@suse.de>,
Gabriel de Perthuis <g2p.code@gmail.com>,
Josef Bacik <jbacik@fusionio.com>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [PROGS PATCH] Import btrfs-extent-same
Date: Tue, 3 Sep 2013 15:28:07 +0200 [thread overview]
Message-ID: <20130903132807.GA18147@suse.cz> (raw)
In-Reply-To: <2014964.FiAiDKtOtq@f17simon>
On Mon, Sep 02, 2013 at 05:53:42PM +0100, Simon Farnsworth wrote:
> On Monday 2 September 2013 18:43:58 David Sterba wrote:
> > Yes that's what I meant and that's what dupremove in your git tree does,
> > right?
> >
> > Using the EXTENT_SAME ioctl without any checks is dangerous, and that's
> > what btrfs-extent-same.c does, so it's suitable for testing but not
> > about to be given to users as-is.
> >
> Why is using EXTENT_SAME without any checks dangerous?
>
> If userspace has to do checks to guarantee safety, what stops an attacker
> deliberately triggering a TOCTTOU race against a checked user of EXTENT_SAME?
> I would expect that unchecked use of EXTENT_SAME simply causes the kernel to
> return BTRFS_SAME_DATA_DIFFERS most of the time, thus slowing you down.
I was mistaken, the ioctl does checks before merging the extents. Sorry
for confusion.
david
next prev parent reply other threads:[~2013-09-03 13:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-26 22:38 [PROGS PATCH] Import btrfs-extent-same Gabriel de Perthuis
2013-08-06 15:31 ` David Sterba
2013-08-13 19:35 ` Mark Fasheh
2013-09-02 16:43 ` David Sterba
[not found] ` <2014964.FiAiDKtOtq@f17simon>
2013-09-03 13:28 ` David Sterba [this message]
2013-09-03 13:41 ` David Sterba
2013-09-03 17:18 ` Mark Fasheh
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=20130903132807.GA18147@suse.cz \
--to=dsterba@suse.cz \
--cc=g2p.code@gmail.com \
--cc=jbacik@fusionio.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=mfasheh@suse.de \
--cc=simon@farnz.org.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.