From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Halcrow Subject: Re: [PATCH 10/12: eCryptfs] Mmap operations Date: Wed, 2 Nov 2005 23:32:58 -0600 Message-ID: <20051103053258.GA32733@halcrow.us> References: <20051103033220.GD2772@sshock.rn.byu.edu> <20051103035530.GJ3005@sshock.rn.byu.edu> Reply-To: Michael Halcrow Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, mhalcrow@us.ibm.com, mcthomps@us.ibm.com, yoder1@us.ibm.com Return-path: Received: from ylpvm15-ext.prodigy.net ([207.115.57.46]:32949 "EHLO ylpvm15.prodigy.net") by vger.kernel.org with ESMTP id S932225AbVKCFgh (ORCPT ); Thu, 3 Nov 2005 00:36:37 -0500 To: Phillip Hellewell Content-Disposition: inline In-Reply-To: <20051103035530.GJ3005@sshock.rn.byu.edu> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org 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