Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1735035ybt; Thu, 18 Jun 2020 16:12:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx45ZE8PiKR9RLBTtKwW54OLloI00ypCPZG8SUYRUxh6beV4DWoXJhWygBqp40VrNVB2rDS X-Received: by 2002:a17:906:68c5:: with SMTP id y5mr973509ejr.436.1592521959425; Thu, 18 Jun 2020 16:12:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592521959; cv=none; d=google.com; s=arc-20160816; b=uQ5bGZp+9vbj+H6OV5rWr3Y+7v+qRIM6jtdt07d7mqKdhAfroZTrzTUiTTMX1LMsEX qmdlDsxii6rErqjqDbN1m6Spp0WUxqIznDwmaLlyNpDHY7e93SdSAGiwon3PLcOxYaZF QJschxfQtIKVayiNsPkLz4rPjLSDXLV0k/PHwIEzgScpo3ZkLbelu2q5DK54qKnjilEl z98kQfU1rceUdCy7g3UMkGvINYKEn57l92yxpV1LVb52pMZHrdNu9cTVvXA+jFhqZF2/ ajNlJ4EqkImwLYSwsmYaiD7292KcEQJDSH3ryHaaE8axwo6RDRls9WkXue+hMjMw9SR9 Lvog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=C0DnPzYvCNIqmY8RYk2xDZMjL3vkiT+YNHz0Ogz4IlI=; b=b4TByOMQtWOtbJ6srK84eHY8j4p6gTVofJKRSF7lu7S7/m1pr9TsNRzmt4Z7WVC/ko c6CnfwKzn6QFjPMWzviwSK01jkWIA3eu4MJyPemTtWU+lLDenVf7Dd+4fJg8NBgfyIde lOsQR6lvdCBHxDIPAnEm1VdlY2bho32Kz9cbvBBUZqg/xa3m8+NTc7GyQPemsJSoC+T8 qvdpF2D1a6y1G6K9SJto2KOB6q8+ZqB6qEbcQ6xzkU1ii120VmoujuD4METdorIQYo2Y mzBOFQRCsADvoogXR8aWcs+/gebp7NK6JqG85tD8tfRgf9v9B8cljXuOMKU6jZQIYZj2 EJYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="L+1dinT/"; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bk19si2626772ejb.669.2020.06.18.16.12.15; Thu, 18 Jun 2020 16:12:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="L+1dinT/"; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729292AbgFRWuM (ORCPT + 99 others); Thu, 18 Jun 2020 18:50:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:57492 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728932AbgFRWuM (ORCPT ); Thu, 18 Jun 2020 18:50:12 -0400 Received: from gmail.com (unknown [104.132.1.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 56F5220720; Thu, 18 Jun 2020 22:50:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592520611; bh=HYGod6h7F0uGZKxft0EPpj5IScO/V7jm1M/teBNdy6s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=L+1dinT/55/j1xVvfBjHT5Et+P7+8KZg4YS557H8LYrg195s8hd/bYt7q+cQL6ZeO zlEj41LEnzrCKAAZ0yeGfyZbsTZY5xWsQemwiJN0ywf0k+qS4Mj4zfUXpiFe+wuBrG vLVCAVzIkptKANY2O81F1qNWTAD3JJQ4Bwcjs+OQ= Date: Thu, 18 Jun 2020 15:50:09 -0700 From: Eric Biggers To: Satya Tangirala Cc: linux-fscrypt@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-ext4@vger.kernel.org Subject: Re: [PATCH 3/4] f2fs: add inline encryption support Message-ID: <20200618225009.GA35732@gmail.com> References: <20200617075732.213198-1-satyat@google.com> <20200617075732.213198-4-satyat@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200617075732.213198-4-satyat@google.com> Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed, Jun 17, 2020 at 07:57:31AM +0000, Satya Tangirala wrote: > Wire up f2fs to support inline encryption via the helper functions which > fs/crypto/ now provides. This includes: > > - Adding a mount option 'inlinecrypt' which enables inline encryption > on encrypted files where it can be used. > > - Setting the bio_crypt_ctx on bios that will be submitted to an > inline-encrypted file. > > - Not adding logically discontiguous data to bios that will be submitted > to an inline-encrypted file. > > - Not doing filesystem-layer crypto on inline-encrypted files. > > This patch includes a fix for a race during IPU by > Sahitya Tummala > > Co-developed-by: Eric Biggers > Signed-off-by: Eric Biggers > Signed-off-by: Satya Tangirala > --- > Documentation/filesystems/f2fs.rst | 7 ++- > fs/f2fs/compress.c | 2 +- > fs/f2fs/data.c | 81 ++++++++++++++++++++++++------ > fs/f2fs/super.c | 32 ++++++++++++ > 4 files changed, 104 insertions(+), 18 deletions(-) > > diff --git a/Documentation/filesystems/f2fs.rst b/Documentation/filesystems/f2fs.rst > index 099d45ac8d8f..4dc36143ff82 100644 > --- a/Documentation/filesystems/f2fs.rst > +++ b/Documentation/filesystems/f2fs.rst > @@ -258,7 +258,12 @@ compress_extension=%s Support adding specified extension, so that f2fs can enab > on compression extension list and enable compression on > these file by default rather than to enable it via ioctl. > For other files, we can still enable compression via ioctl. > -====================== ============================================================ The above line being deleted marks the end of a table, so it shouldn't be deleted (it should go after the part below). > +inlinecrypt > + Encrypt/decrypt the contents of encrypted files using the > + blk-crypto framework rather than filesystem-layer encryption. > + This allows the use of inline encryption hardware. The on-disk > + format is unaffected. For more details, see > + Documentation/block/inline-encryption.rst. Like I commented on one of the commit messages -- this doesn't make it clear what happens in cases where blk-crypto can't be used. Maybe just replace: "Encrypt/decrypt" => "When possible, encrypt/decrypt". Likewise for the ext4 documentation for this same mount option. - Eric