Re: [PATCH 10/12: eCryptfs] Mmap operations

Michael Halcrow
2005-11-03T05:36:38Z

On Wed, Nov 02, 2005 at 08:55:30PM -0700, Phillip Hellewell wrote:
> +static int ecryptfs_writepage(struct page *page, struct writeback_control *wbc)
> +{
> ...
> + ecryptfs_printk(1, KERN_NOTICE, "Copying page\n");
> + memcpy(lower_kaddr, kaddr, crypt_stats->extent_size);

Note that this serves only to reduce the complexity of the execution
path while we try to pin down the kernel oops that shows up on certain
sets of concurrent gcc jobs. When actually encrypting, we are doing
extra page reads and writes with the underlying file to juggle the
initialization vectors. This part will, of course, need to be replaced
with the same crypto operations being done in ecryptfs_commit_write()
in order to encrypt the data on its way out via ecryptfs_writepage().
I will test the patch to do this and offer it as a follow-up once I am
satisfied that it does not regress any of our testcases; this patch
will also reduce the size of the ecryptfs_commit_write() function to
be closer to what it should be.

Thanks,
Mike