Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp745773ybt; Wed, 8 Jul 2020 10:38:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIiFJz8GL4KWrwVxNC43vdyQEE1nXoDd56Ff0gS/YFV8rAZ5n2ywtIJDb0U82uRH0egbRV X-Received: by 2002:a17:906:e2ca:: with SMTP id gr10mr51015438ejb.81.1594229883494; Wed, 08 Jul 2020 10:38:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594229883; cv=none; d=google.com; s=arc-20160816; b=AZgmAPEx2BC+3RLNt2N+FF9EbB9C3Si9V8lrGKdkUY9mKY0QnItj/QA7VL9hNJJ6J+ 3lo40o+XL+DX1I1/EwIdIM28lcCLVc4V0O0PfJawciEafLeXr2ICu1HuW/m6clH767fH obeIi++naRI2fhFVgKD0rBI1fY9wqCEPNg2QBQFUOgzotK68ENfLpBN6ncR93IEc/kLC VZ5SZHDuxwsGnLVHN6kXkmnrFNrboeMeCOh2TDHFQUNnvxDkRvcojU23e4u/4D9PmIXi RJPjmODZRm2dsqXuPgtAx4LeKFHIUesUeJR8JQGDseK5y8lR7/0ZROZVwMuAqB0+m6rL t15A== 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; bh=ixhyvEhFDHCepLgAKgp2gzSfDXTRXTpXEaPYpvrukuQ=; b=uwQqevdOxvhAAKMeLOVXjPniaHsh6xz4oy8ICyQ7HSCrRj7GBI2BWDQXdKD6OEFO0F 03L6e4mKy0Ed6NH7uUISoER+Xhv3VU3o+k0dOK1gsQPhCf/Z0TU+0GmYLWHRwdt5KviS i4IdYE6xV3tqbGVcRXp0pc97cVOh65lFMHH53Jm/LkQq0CVr5+/1uiZbbu3QU4IY885E +Q+fJvW45NZWeTqnKzRLIxbUDKFFz8PqvI+EXW6gs/DvP+Av6FA3QmwzgYZkCg4aXmqt Rs3LvBcaRSx5EyeWglkyzoOwD4wOgEwiGvxLscK9TL3ESwsCqn9v0N3/4thyzgMxQUxC dOAQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dm17si338301ejc.707.2020.07.08.10.37.40; Wed, 08 Jul 2020 10:38:03 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726106AbgGHROw (ORCPT + 99 others); Wed, 8 Jul 2020 13:14:52 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:41337 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725879AbgGHROw (ORCPT ); Wed, 8 Jul 2020 13:14:52 -0400 Received: from callcc.thunk.org (pool-96-230-252-158.bstnma.fios.verizon.net [96.230.252.158]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 068HES9I021454 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 8 Jul 2020 13:14:29 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id 5EA4D420304; Wed, 8 Jul 2020 13:14:28 -0400 (EDT) Date: Wed, 8 Jul 2020 13:14:28 -0400 From: tytso@mit.edu 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, Eric Biggers , Jaegeuk Kim Subject: Re: [PATCH v4 2/4] fscrypt: add inline encryption support Message-ID: <20200708171428.GE1627842@mit.edu> References: <20200702015607.1215430-1-satyat@google.com> <20200702015607.1215430-3-satyat@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200702015607.1215430-3-satyat@google.com> Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu, Jul 02, 2020 at 01:56:05AM +0000, Satya Tangirala wrote: > Add support for inline encryption to fs/crypto/. With "inline > encryption", the block layer handles the decryption/encryption as part > of the bio, instead of the filesystem doing the crypto itself via > Linux's crypto API. This model is needed in order to take advantage of > the inline encryption hardware present on most modern mobile SoCs. > > To use inline encryption, the filesystem needs to be mounted with > '-o inlinecrypt'. Blk-crypto will then be used instead of the traditional > filesystem-layer crypto whenever possible to encrypt the contents > of any encrypted files in that filesystem. Fscrypt still provides the key > and IV to use, and the actual ciphertext on-disk is still the same; > therefore it's testable using the existing fscrypt ciphertext verification > tests. > > Note that since blk-crypto has a fallback to Linux's crypto API, and > also supports all the encryption modes currently supported by fscrypt, > this feature is usable and testable even without actual inline > encryption hardware. > > Per-filesystem changes will be needed to set encryption contexts when > submitting bios and to implement the 'inlinecrypt' mount option. This > patch just adds the common code. > > Co-developed-by: Eric Biggers > Signed-off-by: Eric Biggers > Signed-off-by: Satya Tangirala > Reviewed-by: Jaegeuk Kim > Reviewed-by: Eric Biggers Reviewed-by: Theodore Ts'o