linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Pottage <david@chrestomanci.org>
To: Austin S Hemmelgarn <ahferroin7@gmail.com>,
	Vimal A R <arvimal@yahoo.in>,
	"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: Ideas for a feature implementation
Date: Tue, 12 Aug 2014 16:52:50 +0100	[thread overview]
Message-ID: <53EA3852.2000607@chrestomanci.org> (raw)
In-Reply-To: <53E83035.8010603@gmail.com>


On 11/08/14 03:53, Austin S Hemmelgarn wrote:

> Another thing that isn't listed there, that I would personally love to
> see is support for secure file deletion.  To be truly secure though,
> this would need to hook into the COW logic so that files marked for
> secure deletion can't be reflinked (maybe make the automatically NOCOW
> instead, and don't allow snapshots?), and when they get written to, the
> blocks that get COW'ed have the old block overwritten.
How would secure deletion interact with file de-duplication?

For example suppose you and I are both users on a multi user system. We 
both obtain copies of the same file independently, and save that file to 
our home directories.

A background process notices that both files are the same and 
de-duplicates them. This means that both your file and mine point to the 
same blocks on disc. This is exactly the same as would happen if you 
made a COW copy of your file, transferred ownership to me, and I moved 
it into my home dir.

You then decide to secure delete your copy of the file. What happens to 
mine? If it gets removed, then you have just deleted a file you don't 
own, if it does not then the file-system has broken the contract to 
secure delete a file when you asked it to.

Also, what happens if the two files have similar portions, but they are 
not identical. For example, if you download and ISO image for ubuntu, 
and I download the ISO for kubuntu (at the same version). There will be 
a lot of sections that are the same, because they will contain a lot of 
packages in common, so there will be large gains in de-duplicating the 
similar parts, but most people would consider the files to be different.

Could this mean that if you secure delete your ubuntu iso, then portions 
of my kubuntu iso might become corrupt?

Even if we limit secure delete to root, then we still leave the risk of 
unintentonaly breaking user files, because non-one realised that all or 
part of the file appears in other files via de-duplication. In any case 
if secure delete is limited to root, then most people would not find it 
useful. (or they would use sudo to do it, which brings us back to the 
same problems).

Basically, I think that file secure deletion as a concept is not 
compatible with a 5th generation file system. If you relay want to 
securely remove a file, then copy the stuff you need elsewhere, and put 
the disc in the crusher. Alternatively put the filesystem in an encypted 
container, and then reformat the disc with a different encryption key.

-- 
David Pottage.












  parent reply	other threads:[~2014-08-12 16:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-10 19:21 Ideas for a feature implementation Vimal A R
2014-08-11  2:53 ` Austin S Hemmelgarn
2014-08-11 20:27   ` Chris Murphy
2014-08-12  2:27     ` Austin S Hemmelgarn
2014-08-12  3:04       ` Chris Murphy
2014-08-12 15:52   ` David Pottage [this message]
2014-08-12 17:34     ` Austin S Hemmelgarn
2014-08-13 12:26     ` Brendan Hide
2014-08-12 16:38   ` Erkki Seppala
2014-08-12 11:00 ` Konstantinos Skarlatos
2014-08-13 11:01   ` David Pottage
2014-08-13 11:05     ` Konstantinos Skarlatos
2014-08-17 21:17     ` Chris Murphy

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=53EA3852.2000607@chrestomanci.org \
    --to=david@chrestomanci.org \
    --cc=ahferroin7@gmail.com \
    --cc=arvimal@yahoo.in \
    --cc=linux-btrfs@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).