mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Michael Halcrow <mhalcrow@us.ibm.com>
Cc: phillip@hellewell.homeip.net, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, viro@ftp.linux.org.uk,
	mike@halcrow.us, mcthomps@us.ibm.com, yoder1@us.ibm.com,
	toml@us.ibm.com, emilyr@us.ibm.com, daw@cs.berkeley.edu
Subject: Re: eCryptfs Design Document
Date: Fri, 24 Mar 2006 16:33:58 -0800	[thread overview]
Message-ID: <20060324163358.557ac5f7.akpm@osdl.org> (raw)
In-Reply-To: <20060325001345.GC13688@us.ibm.com>

Michael Halcrow <mhalcrow@us.ibm.com> wrote:
>
> On Fri, Mar 24, 2006 at 03:49:20PM -0800, Andrew Morton wrote:
> > Michael Halcrow <mhalcrow@us.ibm.com> wrote:
> > > On a page read, the eCryptfs page index is interpolated into the
> > > corresponding lower page index, taking into account the header page in
> > > the file.
> > 
> > I trust that PAGE_CACHE_SIZE is not implicitly encoded into the file
> > layout?
> 
> For release 0.1, it is. Managing differing page sizes is one of the
> not-so-trivial changes to eCryptfs that we have planned for the 0.2
> release. For this release, we can easily include a flag setting in the
> header that indicates the page size, so that at least eCryptfs will
> return a -EIO when the file is moved between hosts with different page
> sizes. We will make sure that this is in the code before it is
> submitted.
> 
> Do you think that this is an acceptable approach for the initial
> release of eCryptfs?

Well it's not good.  Will ecryptfs-0.1 files be both-way compatible with
ecryptfs-0.2 files?

The basic unit of a pagecache page's backing store should be a
filesystem-determined blocksize, divorced from page sizes.

For your purposes we can abstract things out a bit and not have to worry
about the actual on-underlying-disk blocksize.  Which is fortunate, because
you want an ecryptfs-on-ext3-on-1kblocksize file to work when copied to an
ecryptfs-on-ext2-on-2kblocksize filesystem.

I think it would be acceptable to design ecryptfs to assume that its
underlying store has a 4096-byte "blocksize".  So all the crypto operates
on 4096-byte hunks and the header is 4096-bytes long and things are copied
to and from the underlying fs's pagecache in 4096-byte hunks.

That's because 4096 is, for practical purposes, the minimum Linux
PAGE_CACHE_SIZE.  Globally available and all filesystems support it.

> 
> ...
>
> Speaking of which, is there any particular way of breaking the code
> into patches that you would prefer for delivery of a new filesystem?
> In the past, we have been breaking the code into one patch for
> inode.c, another for dentry.c, and so forth.

That seems a reasonable way of doing it.  It's all logically one patch, but
for review purposes we need some sort of splitup.

> > One dutifully wonders whether all this functionality could be
> > provided via FUSE...
> 
> My main concern with FUSE has to do with shared memory mappings.

OK.  But I'm sure Miklos would appreciate help with that ;)

> My
> next concern is with regard to performance impact of constant context
> switching during page reads and writes.

Maybe.  One could estimate the cost of that by benchmarking an existing
(efficient) FUSE fs and then add fiddle factors.  If the number of copies
is the same for in-kernel versus FUSE then one would expect the performance
to be similar.  Especially if the encrypt/decryption cost perponderates.


  reply	other threads:[~2006-03-25  0:31 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-24 22:25 Michael Halcrow
2006-03-24 23:12 ` James Morris
2006-03-27 16:17   ` Michael Thompson
2006-03-27 16:52   ` Michael Halcrow
2006-03-24 23:49 ` Andrew Morton
2006-03-25  0:13   ` Michael Halcrow
2006-03-25  0:33     ` Andrew Morton [this message]
2006-03-25  7:38       ` Miklos Szeredi
2006-03-27 23:31       ` Michael Halcrow
2006-03-28 16:00         ` Stephen C. Tweedie
2006-03-29 20:14           ` Michael Halcrow
2006-03-25 19:28 ` Phillip Susi
2006-03-25 19:50   ` Michael Halcrow
2006-03-26 17:10     ` Phillip Susi
2006-03-26 18:04       ` Michael Halcrow
2006-03-27  0:05         ` Phillip Hellewell
2006-03-27  2:53           ` Phillip Susi
2006-03-27 16:10             ` Michael Thompson
2006-04-10  2:11 ` David Wagner
2006-03-28 13:49 Christian Cachin

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=20060324163358.557ac5f7.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=daw@cs.berkeley.edu \
    --cc=emilyr@us.ibm.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcthomps@us.ibm.com \
    --cc=mhalcrow@us.ibm.com \
    --cc=mike@halcrow.us \
    --cc=phillip@hellewell.homeip.net \
    --cc=toml@us.ibm.com \
    --cc=viro@ftp.linux.org.uk \
    --cc=yoder1@us.ibm.com \
    /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

Powered by JetHome