From: Satya Tangirala <satyat@google.com>
To: linux-fscrypt@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net,
linux-ext4@vger.kernel.org
Cc: Satya Tangirala <satyat@google.com>
Subject: [PATCH v4 0/4] Inline Encryption Support for fscrypt
Date: Thu, 2 Jul 2020 01:56:03 +0000 [thread overview]
Message-ID: <20200702015607.1215430-1-satyat@google.com> (raw)
This patch series adds support for Inline Encryption to fscrypt, f2fs
and ext4. It builds on the inline encryption support now present in
the block layer, and has been rebased on v5.8-rc3. Note that Patches 1 and
2 can be applied independently of Patches 3 and 4 (and Patches 3 and 4 can
be applied independently of each other).
This patch series previously went though a number of iterations as part
of the "Inline Encryption Support" patchset (last version was v13:
https://lkml.kernel.org/r/20200514003727.69001-1-satyat@google.com).
Patch 1 introduces the SB_INLINECRYPT sb options, which filesystems
should set if they want to use blk-crypto for file content en/decryption.
Patch 2 adds inline encryption support to fscrypt. To use inline
encryption with fscrypt, the filesystem must set the above mentioned
SB_INLINECRYPT sb option. When this option is set, the contents of
encrypted files will be en/decrypted using blk-crypto.
Patches 3 and 4 wire up f2fs and ext4 respectively to fscrypt support for
inline encryption, and e.g ensure that bios are submitted with blocks
that not only are contiguous, but also have continuous DUNs.
This patchset was tested by running xfstests with the "inlinecrypt" mount
option on ext4 and f2fs with test dummy encryption (the actual
en/decryption of file contents was handled by the blk-crypto-fallback). It
was also tested along with the UFS patches from the original series on some
Qualcomm and Mediatek chipsets with hardware inline encryption support
(refer to
https://lkml.kernel.org/linux-scsi/20200501045111.665881-1-ebiggers@kernel.org/
and
https://lkml.kernel.org/linux-scsi/20200304022101.14165-1-stanley.chu@mediatek.com/
for more details on those tests).
Changes v3 => v4
- change the page_is_mergeable() check in add_ipu_page() to an f2fs_bug_on
since the only caller of add_ipu_page() already checks page_is_mergeable
- add reviewed by
Changes v2 => v3
- Fix issue with inline encryption + IV_INO_LBLK_32 policy found by Eric
- minor cleanup
Changes v1 => v2
- SB_INLINECRYPT mount option is shown by individual filesystems instead
of by the common VFS code since the option is parsed by filesystem
specific code, and is not a mount option applicable generically to
all filesystems.
- Make fscrypt_select_encryption_impl() return error code when it fails
to allocate memory.
- cleanups
Changes v13 in original patchset => v1
- rename struct fscrypt_info::ci_key to ci_enc_key
- set dun bytes more precisely in fscrypt
- cleanups
Eric Biggers (1):
ext4: add inline encryption support
Satya Tangirala (3):
fs: introduce SB_INLINECRYPT
fscrypt: add inline encryption support
f2fs: add inline encryption support
Documentation/admin-guide/ext4.rst | 7 +
Documentation/filesystems/f2fs.rst | 7 +
Documentation/filesystems/fscrypt.rst | 3 +
fs/buffer.c | 7 +-
fs/crypto/Kconfig | 6 +
fs/crypto/Makefile | 1 +
fs/crypto/bio.c | 51 ++++
fs/crypto/crypto.c | 2 +-
fs/crypto/fname.c | 4 +-
fs/crypto/fscrypt_private.h | 115 +++++++-
fs/crypto/inline_crypt.c | 364 ++++++++++++++++++++++++++
fs/crypto/keyring.c | 6 +-
fs/crypto/keysetup.c | 70 +++--
fs/crypto/keysetup_v1.c | 16 +-
fs/ext4/inode.c | 4 +-
fs/ext4/page-io.c | 6 +-
fs/ext4/readpage.c | 11 +-
fs/ext4/super.c | 12 +
fs/f2fs/compress.c | 2 +-
fs/f2fs/data.c | 79 +++++-
fs/f2fs/super.c | 35 +++
include/linux/fs.h | 1 +
include/linux/fscrypt.h | 82 ++++++
23 files changed, 820 insertions(+), 71 deletions(-)
create mode 100644 fs/crypto/inline_crypt.c
--
2.27.0.212.ge8ba1cc988-goog
next reply other threads:[~2020-07-02 1:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-02 1:56 Satya Tangirala [this message]
2020-07-02 1:56 ` [PATCH v4 1/4] fs: introduce SB_INLINECRYPT Satya Tangirala
2020-07-08 17:07 ` tytso
2020-07-02 1:56 ` [PATCH v4 2/4] fscrypt: add inline encryption support Satya Tangirala
2020-07-08 17:14 ` tytso
2020-07-02 1:56 ` [PATCH v4 3/4] f2fs: " Satya Tangirala
2020-07-02 1:56 ` [PATCH v4 4/4] ext4: " Satya Tangirala
2020-07-08 17:18 ` tytso
2020-07-08 17:34 ` Eric Biggers
2020-07-07 18:08 ` [PATCH v4 0/4] Inline Encryption Support for fscrypt Eric Biggers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200702015607.1215430-1-satyat@google.com \
--to=satyat@google.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fscrypt@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).