From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936239AbcKOSPM (ORCPT ); Tue, 15 Nov 2016 13:15:12 -0500 Received: from mail-pf0-f171.google.com ([209.85.192.171]:36572 "EHLO mail-pf0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933236AbcKOSPF (ORCPT ); Tue, 15 Nov 2016 13:15:05 -0500 Date: Tue, 15 Nov 2016 10:14:55 -0800 From: Eric Biggers To: Richard Weinberger Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, dedekind1@gmail.com, adrian.hunter@intel.com, tytso@mit.edu, jaegeuk@kernel.org, david@sigma-star.at, wd@denx.de, sbabic@denx.de, dengler@linutronix.de, mhalcrow@google.com, hch@infradead.org Subject: Re: [PATCH 01/29] fscrypt: Add in-place encryption mode Message-ID: <20161115181455.GA127180@google.com> References: <1479072072-6844-1-git-send-email-richard@nod.at> <1479072072-6844-2-git-send-email-richard@nod.at> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1479072072-6844-2-git-send-email-richard@nod.at> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Sun, Nov 13, 2016 at 10:20:44PM +0100, Richard Weinberger wrote: > From: David Gstir > > ext4 and f2fs require a bounce page when encrypting pages. However, not > all filesystems will need that (eg. UBIFS). This is handled via a > flag on fscrypt_operations where a fs implementation can select in-place > encryption over using a bounce page (which is the default). > > Signed-off-by: David Gstir > Signed-off-by: Richard Weinberger The comment for fscrypt_encrypt_page() still says the following: * Called on the page write path. The caller must call * fscrypt_restore_control_page() on the returned ciphertext page to * release the bounce buffer and the encryption context. It seems this isn't correct anymore. It also looks like the fscrypt_context never gets released in the case where the page is encrypted in-place. Additionally, after this change the name of the flag FS_WRITE_PATH_FL is misleading, since it now really indicates the presence of a bounce buffer rather than the "write path". Eric