From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Biggers Subject: [PATCH 00/13] fscrypt, ext4: prepare for blocksize != PAGE_SIZE Date: Wed, 1 May 2019 15:45:02 -0700 Message-ID: <20190501224515.43059-1-ebiggers@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1hLxzQ-0008Up-0D for linux-f2fs-devel@lists.sourceforge.net; Wed, 01 May 2019 22:46:12 +0000 Received: from mail.kernel.org ([198.145.29.99]) by sfi-mx-4.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) id 1hLxzO-0025Fb-Ka for linux-f2fs-devel@lists.sourceforge.net; Wed, 01 May 2019 22:46:11 +0000 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net To: linux-fscrypt@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-mtd@lists.infradead.org, Chandan Rajendra , linux-f2fs-devel@lists.sourceforge.net Hello, This patch series prepares fs/crypto/, and partially ext4, for the 'blocksize != PAGE_SIZE' case. This basically contains the encryption changes from Chandan Rajendra's patch series "[V2,00/13] Consolidate FS read I/O callbacks code" (https://patchwork.kernel.org/project/linux-fscrypt/list/?series=111039) that don't require introducing the read_callbacks and don't depend on fsverity stuff. But they've been reworked to clean things up a lot. I propose that to move things forward for ext4 encryption with 'blocksize != PAGE_SIZE', we apply this series (or something similar) to the fscrypt tree for 5.3 on its own merits. Then the read_callbacks series on top of it will much smaller and easier to review. AFAIK, after this series the only thing stopping ext4 encryption from working with blocksize != PAGE_SIZE is the lack of encryption support in block_read_full_page(), which the read_callbacks will address. This series applies to the fscrypt tree, and it can also be retrieved from git at https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git branch "fscrypt-subpage-blocks-prep". Chandan Rajendra (3): ext4: clear BH_Uptodate flag on decryption error ext4: decrypt only the needed blocks in ext4_block_write_begin() ext4: decrypt only the needed block in __ext4_block_zero_page_range() Eric Biggers (10): fscrypt: simplify bounce page handling fscrypt: remove the "write" part of struct fscrypt_ctx fscrypt: rename fscrypt_do_page_crypto() to fscrypt_crypt_block() fscrypt: clean up some BUG_ON()s in block encryption/decryption fscrypt: introduce fscrypt_encrypt_block_inplace() fscrypt: support encrypting multiple filesystem blocks per page fscrypt: handle blocksize < PAGE_SIZE in fscrypt_zeroout_range() fscrypt: introduce fscrypt_decrypt_block_inplace() fscrypt: support decrypting multiple filesystem blocks per page ext4: encrypt only up to last block in ext4_bio_write_page() fs/crypto/bio.c | 73 +++------ fs/crypto/crypto.c | 299 ++++++++++++++++++++---------------- fs/crypto/fscrypt_private.h | 14 +- fs/ext4/inode.c | 35 +++-- fs/ext4/page-io.c | 44 +++--- fs/f2fs/data.c | 17 +- fs/ubifs/crypto.c | 19 +-- include/linux/fscrypt.h | 96 ++++++++---- 8 files changed, 319 insertions(+), 278 deletions(-) -- 2.21.0.593.g511ec345e18-goog