Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6591324yba; Wed, 1 May 2019 15:46:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqyJkYovkw7JJrNCOTlyCWX068+fco9/JOBzLanUocSBNp8V4CrwP9dAbV2wmQpNwvgMoJiK X-Received: by 2002:a65:5c82:: with SMTP id a2mr531618pgt.378.1556750789568; Wed, 01 May 2019 15:46:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556750789; cv=none; d=google.com; s=arc-20160816; b=dlc2pLWx01eu/xmnNUheYITW/ldes36sA7rBFFmBwvCfT8ZpOvul1k3K9FwB+l5gaO Lg7JtlfjA40X2+NdaihUdLD7tZIhWCJJmzSMXLE4r4kS2A6fek8K4NLyf7jPRBqshMBs 7aQi5mKq678/NTrRfF/aSCl+t505qcwrR1tTM8Hv2TV2Z/vi+L50mcCcv8kX63XbR6rh sjliJmGjhaf+2G0BQcnY74sF6z3ZyCNlqxi6GdfLxxwlqKsM1+h6hDo/d4CFYgWk5IYW oTuoYIJO5/sT89I74pGIR8v6sOnRSAPOAf/A+ObbiEnCDHNWCofB4SAdar+gscblBhJ/ nt2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=2zbVJD+2qrR4Zf6ilS+/X+bi5SN7Vzwz5Fh0RnK/Fa4=; b=Q7B6dpRZME0gJIEkNIdCGMm0gGSeyPIlvcs5cVZVoG+CMJH/2bKhGsTKm13P+41c1L 96Al5zDoo5k/TyCRjAmLAxwzZV+5iT+sjh18CDkf81pqrB/vqg+I332Z6jPxfDTAcPGB bk62Sauuaeej6fanVF0IeuNvSly4NwaLhYhYtkX9xjnIUDf+J6KDr4JhKvhwpLtnxIVy 9voPWUYY7nRYuLAN4heL+swyJs65SOkiHZsv2o37gWQCHvimyxg+15zHvY53D/WPXMT7 qvqImND2ttoZ+LbXEOzaRgkpqqspP8Wlbfpgs3JXr3Tmkk1+ZGg8XxwO9eSllWjnWDvm kLiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fY4qq9BA; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id o8si34079292pgp.170.2019.05.01.15.46.09; Wed, 01 May 2019 15:46:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fY4qq9BA; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 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 S1726191AbfEAWqG (ORCPT + 99 others); Wed, 1 May 2019 18:46:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:47166 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726126AbfEAWqG (ORCPT ); Wed, 1 May 2019 18:46:06 -0400 Received: from ebiggers-linuxstation.mtv.corp.google.com (unknown [104.132.1.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DA3792075E; Wed, 1 May 2019 22:46:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556750765; bh=oGYtn9WG6er+4eiwYl5cJh2irdpTYgDLIblN4GE18gE=; h=From:To:Cc:Subject:Date:From; b=fY4qq9BAopEMgbyNEunjj+aef9mfWckZY+TJ4tM2F9Yms7jKNXtspSCI4MTU8zXaG b7538Lqq4jiQWV0QrHpbaVi5BTg05KPbB0pix79PFbPT1Ve17AUnOmS6V4Qt4lmAqB G2UwnTy2ET1YrFL8yY0aMeRi7tzVGJLjHvgWyWxA= From: Eric Biggers To: linux-fscrypt@vger.kernel.org Cc: linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-mtd@lists.infradead.org, linux-fsdevel@vger.kernel.org, Chandan Rajendra 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> X-Mailer: git-send-email 2.21.0.593.g511ec345e18-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org 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