Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp1101452rwj; Fri, 23 Dec 2022 12:40:21 -0800 (PST) X-Google-Smtp-Source: AMrXdXv7mkRnxlSX3W82jHRChiyLtjIw9gC7Uf5pOypmLATwbTk4VhijbsCn6lK1eoNNUY7g2Pl2 X-Received: by 2002:a17:906:944c:b0:7c0:bd68:ce30 with SMTP id z12-20020a170906944c00b007c0bd68ce30mr9092697ejx.54.1671828020826; Fri, 23 Dec 2022 12:40:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671828020; cv=none; d=google.com; s=arc-20160816; b=WLqIL68qPYZgNeyCB4Xb9m/LytxxivJSL6xfM+wWxQT7cHPy2Lf10mAy5dEQrMCJyw Ctcxi5txi8vWHxcwEIgGZMKiY/zrJvOTv1M94MUnA+fqJqh5SCm9lGyDSwhpZZR0EZ/2 09Nb/dXKY02DFLvz2W5dAM7TKVNiGxDObxAiRBvXImlg7T9fO/dCFwW1eFBOqoEhqm3L S6DT6DCCFKAhalI4JHwXmi2AvvhNKGaMoYUDYVlios2g7tESef01AzKttfn7HGjWGJBa pk3JG+B5k8abwok99fWRfGdvY4rKtBIwQay1ucIUfcFzTF1RPQthqlw+xuNh4itATdtc AJQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=IlQ4AZVLaRGn0b7mAEpQpaMCiLoFhSmHaLxhN++R7NU=; b=OLSSP2jcf06FcCxYYI0jtv7xJvwh4bgZHBPrr2vOvPCKyPe/3odyx5Hljc3kakzssf 1TybGCPhXo+ogiT7TPoqBW1KCiMmW8BnGOBuEE/vazlua/uQUTxWlHrevkVqq0f2Zihr S7rDSnRoBp6kUMaXQ8gTzkSz9OXNd+XHUG7nMg/qOJ2WvZ6JcEn/UusYJZcMSVTSv7aC VryHvpFAVAJMqDvG8n6NCoRnTJ0t1zLv6SRfeY2Ov4jjfy1TSCxtfUMbiBFeqnwNIlwL R56HlIaB6TiO61zJkvhKM1qoZR60N1FEi97RmCY9qiam0DorzMhJFqN0o/98MLlGw4Dh XGwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XQdKCLLe; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xj8-20020a170906db0800b007c16d82961csi3219395ejb.278.2022.12.23.12.39.57; Fri, 23 Dec 2022 12:40:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XQdKCLLe; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S233351AbiLWUhQ (ORCPT + 99 others); Fri, 23 Dec 2022 15:37:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232428AbiLWUhB (ORCPT ); Fri, 23 Dec 2022 15:37:01 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4723F1DA66; Fri, 23 Dec 2022 12:37:01 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D720461F25; Fri, 23 Dec 2022 20:37:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 11D60C433D2; Fri, 23 Dec 2022 20:37:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1671827820; bh=qLoSGFi2QkFfE5PAtk38FT/yWSIKsO+TzvgyJfycJFQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XQdKCLLelfI4SoxzCMAnCUtgdS+h9/wA0ND1Sx878oRw5ipn2eXs8emLgIEWu7IIf JBsFNvEu/j58OSutvkMWLShj6wyhrUy37JNS2DnPwotL4+tmwysUERhVyhSs7ei+h9 NKtBVyxLlMbc7C4ITMY+Kw7pVpPh7GXAnZFYIueqVWBYPwPpAXrpLLXbi8ujGYPUD5 QFlSPCJd9Yuo0zOm5Dldc8Jq66Lwkia/3lxTXrKYU+xSn7wVnfBP2VDx3inq3A52bz ChvrTaw6ccDIJgTioKbE631T7CAD6ukJcDD2rq+lINmp6BCvnCVN2Uz2bCbYl+fKG8 rgFvJqVI6oY7w== From: Eric Biggers To: linux-fscrypt@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-btrfs@vger.kernel.org, linux-xfs@vger.kernel.org, Andrey Albershteyn Subject: [PATCH v2 11/11] ext4: allow verity with fs block size < PAGE_SIZE Date: Fri, 23 Dec 2022 12:36:38 -0800 Message-Id: <20221223203638.41293-12-ebiggers@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221223203638.41293-1-ebiggers@kernel.org> References: <20221223203638.41293-1-ebiggers@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,SUSPICIOUS_RECIPS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org From: Eric Biggers Now that the needed changes have been made to fs/buffer.c, ext4 is ready to support the verity feature when the filesystem block size is less than the page size. So remove the mount-time check that prevented this. Signed-off-by: Eric Biggers --- Documentation/filesystems/fsverity.rst | 8 +++++--- fs/ext4/super.c | 5 ----- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Documentation/filesystems/fsverity.rst b/Documentation/filesystems/fsverity.rst index 948d202545240..c0c8a25b41bb8 100644 --- a/Documentation/filesystems/fsverity.rst +++ b/Documentation/filesystems/fsverity.rst @@ -497,9 +497,11 @@ To create verity files on an ext4 filesystem, the filesystem must have been formatted with ``-O verity`` or had ``tune2fs -O verity`` run on it. "verity" is an RO_COMPAT filesystem feature, so once set, old kernels will only be able to mount the filesystem readonly, and old -versions of e2fsck will be unable to check the filesystem. Moreover, -currently ext4 only supports mounting a filesystem with the "verity" -feature when its block size is equal to PAGE_SIZE (often 4096 bytes). +versions of e2fsck will be unable to check the filesystem. + +Originally, an ext4 filesystem with the "verity" feature could only be +mounted when its block size was equal to the system page size +(typically 4096 bytes). In Linux v6.3, this limitation was removed. ext4 sets the EXT4_VERITY_FL on-disk inode flag on verity files. It can only be set by `FS_IOC_ENABLE_VERITY`_, and it cannot be cleared. diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 16a343e8047d4..798cb19e2258b 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -5336,11 +5336,6 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb) } } - if (ext4_has_feature_verity(sb) && sb->s_blocksize != PAGE_SIZE) { - ext4_msg(sb, KERN_ERR, "Unsupported blocksize for fs-verity"); - goto failed_mount_wq; - } - /* * Get the # of file system overhead blocks from the * superblock if present. -- 2.39.0