Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/2221453/?format=api
{ "id": 2221453, "url": "http://patchwork.ozlabs.org/api/1.2/patches/2221453/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260409131404.1545834-6-aalbersh@kernel.org/", "project": { "id": 8, "url": "http://patchwork.ozlabs.org/api/1.2/projects/8/?format=api", "name": "Linux ext4 filesystem development", "link_name": "linux-ext4", "list_id": "linux-ext4.vger.kernel.org", "list_email": "linux-ext4@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260409131404.1545834-6-aalbersh@kernel.org>", "list_archive_url": null, "date": "2026-04-09T13:13:37", "name": "[v7,05/22] fsverity: pass digest size and hash of the all-zeroes block to ->write", "commit_ref": null, "pull_url": null, "state": "not-applicable", "archived": false, "hash": "ec4da42cc00c4ba564c42c1b4ede1e2d3b40bc27", "submitter": { "id": 92821, "url": "http://patchwork.ozlabs.org/api/1.2/people/92821/?format=api", "name": "Andrey Albershteyn", "email": "aalbersh@kernel.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260409131404.1545834-6-aalbersh@kernel.org/mbox/", "series": [ { "id": 499292, "url": "http://patchwork.ozlabs.org/api/1.2/series/499292/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/list/?series=499292", "date": "2026-04-09T13:13:34", "name": "fs-verity support for XFS with post EOF merkle tree", "version": 7, "mbox": "http://patchwork.ozlabs.org/series/499292/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2221453/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2221453/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <SRS0=vpgi=CI=vger.kernel.org=linux-ext4+bounces-15702-patchwork-incoming=ozlabs.org@ozlabs.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "linux-ext4@vger.kernel.org" ], "Delivered-To": [ "patchwork-incoming@legolas.ozlabs.org", "patchwork-incoming@ozlabs.org" ], "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=Ps75ygxs;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.org\n (client-ip=150.107.74.76; helo=mail.ozlabs.org;\n envelope-from=srs0=vpgi=ci=vger.kernel.org=linux-ext4+bounces-15702-patchwork-incoming=ozlabs.org@ozlabs.org;\n receiver=patchwork.ozlabs.org)", "gandalf.ozlabs.org;\n arc=pass smtp.remote-ip=172.105.105.114 arc.chain=subspace.kernel.org", "gandalf.ozlabs.org;\n dmarc=pass (p=quarantine dis=none) header.from=kernel.org", "gandalf.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=Ps75ygxs;\n\tdkim-atps=neutral", "gandalf.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.105.105.114; helo=tor.lore.kernel.org;\n envelope-from=linux-ext4+bounces-15702-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=\"Ps75ygxs\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201" ], "Received": [ "from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fs0s63DcKz1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 09 Apr 2026 23:19:38 +1000 (AEST)", "from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\n\tby gandalf.ozlabs.org (Postfix) with ESMTP id 4fs0s62nNLz4wTL\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 09 Apr 2026 23:19:38 +1000 (AEST)", "by gandalf.ozlabs.org (Postfix)\n\tid 4fs0s62kLvz4wLh; Thu, 09 Apr 2026 23:19:38 +1000 (AEST)", "from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby gandalf.ozlabs.org (Postfix) with ESMTPS id 4fs0s2642kz4wTL\n\tfor <patchwork-incoming@ozlabs.org>; Thu, 09 Apr 2026 23:19:34 +1000 (AEST)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id C1BD0302CD3B\n\tfor <patchwork-incoming@ozlabs.org>; Thu, 9 Apr 2026 13:15:28 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 5C48D3D4117;\n\tThu, 9 Apr 2026 13:14:27 +0000 (UTC)", "from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org\n [10.30.226.201])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 69EE43CFF67;\n\tThu, 9 Apr 2026 13:14:26 +0000 (UTC)", "by smtp.kernel.org (Postfix) with ESMTPSA id 79B1FC2BC87;\n\tThu, 9 Apr 2026 13:14:23 +0000 (UTC)" ], "ARC-Seal": [ "i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1775740778; cv=pass;\n\tb=iNaFlpVNN/RxHLRLGsYC6BuwNC6weAAxpEyF+uXtkyjhBIMHugTwrIB4mT2cKPd6ReU+51tJvnLkNew5S5+0IwRhdYpf0MwlrgFa16hppVaJ8D7s7n75dyosqSwtBEC5X78/1piGiNqJnve/ehhwXcSS215JlN8CDFOyxmstEAKafJMyDJBAY0soqKeMrSfkk6F6EJ7yyMvqdPusQdj3UwtREh36Rehjxf6tGL25l3APT6w2xOOG55xBZe64hrpElJ48h6xX4Zj6w4K9+91F5nAC0MCbP7G/1Hp+T1WfOHdvd3jb8rAeZOtz9zBCX+/eNPxnnbYye3UPB561IEaDuw==", "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775740466; cv=none;\n b=AvhNG7cd7DaAM+BPebIrAae/lKy+Oiz3CPfwBuwzjDcm9snw0IApDJmS02BisztCWTk0WjIKJtuPVw621QWp8R4xK80WoO/E+ngpe+thUX0r1PJb5lD+VMM2QDiJ+Es5U7sNOVNwMntTZMYoA4sV9YIOKuTQQMJpvfSzquSfQ0A=" ], "ARC-Message-Signature": [ "i=2; a=rsa-sha256; d=ozlabs.org; s=201707;\n\tt=1775740778; c=relaxed/relaxed;\n\tbh=93DLvc90uzweudKPJBRLxyYewSJl7KjFZPXI6YRrSlM=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=JKbjOa6q+p/VNYS+ZcMmEG0DnouT/sO2Ws73FRI+GTqbjQX77M5heKjMISNq+v3CYVkfsIwb+atdU7kB+LyDso2qms+ElnVm1PbKpkesJgkymGgoPImyBpxlOq+CjG7pFzA/h0ivdivYFTl7WRxYOP9+4yeciiHTRMzo3WGuGzbPOJQbzfri4PbQEe/CiDSBufTBPvYbtDPddlnD1Rg1o8tHR5Sxr8+uIXVofRFl9zF/S6CSgha6mwa53Y/CIJ5BmS6hXfWn116+HN5eSfucCeUKM7EHP8GHOlKN6EkRsVdu7R1qQ9arkhw3LX5Xrk9zELLgLaTFuJGwUXD2DK18Dw==", "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775740466; c=relaxed/simple;\n\tbh=ObHO7TkH81lQ/7riwrZcCIrbr/LS6erJut4SJ367X5k=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=EbA8tnunQkRi9NKthU4CF2a5yfvGJg3VxhmP0yrLvDdR/6lHjBSfB88gg7URaUp4ycQViJVhfnWt4dxdsH87yNispKoTiMYxybFP9IdXnxQWia31Ja3z/eXLg0McEkzYiu4cnIBhO8OkQksPiVAYOR6ct6Gdh8a8tRaAVNFIY1E=" ], "ARC-Authentication-Results": [ "i=2; gandalf.ozlabs.org;\n dmarc=pass (p=quarantine dis=none) header.from=kernel.org;\n dkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=Ps75ygxs; dkim-atps=neutral;\n spf=pass (client-ip=172.105.105.114; helo=tor.lore.kernel.org;\n envelope-from=linux-ext4+bounces-15702-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org) smtp.mailfrom=vger.kernel.org", "i=1; smtp.subspace.kernel.org;\n dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=Ps75ygxs; arc=none smtp.client-ip=10.30.226.201" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1775740465;\n\tbh=ObHO7TkH81lQ/7riwrZcCIrbr/LS6erJut4SJ367X5k=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=Ps75ygxsgC2Us9bN+DSlmN4B0f7auE+ptTkZy5v+OCv4pQdZteU9m6BXsAzRRmX3e\n\t jesq3gm8sC05xLrSkGnei9k+WiicbqqbhTG7HkQXu9qOFUmdXQREN8DzRy3lPKqljU\n\t LwSJ6uwDDDVTzXLOSCnQhGCBdHVyYj5cEQpVOWsXdA5LoB7VQ32RWK8UHsD03E9Gdl\n\t JOw5RO/jGjFBI/qxQqkriwyQvJB8dmnL/jyfa+0EzVnhwfpdIf/QM+QQLyelioTD3q\n\t JCznG3rpIOF4DoGPsecHwypG3hYR5+/5YTqFQn+UbwB0YBimgqNk0/OCDVHcIqk0yA\n\t vFZdOdLWV3yYA==", "From": "Andrey Albershteyn <aalbersh@kernel.org>", "To": "linux-xfs@vger.kernel.org,\n\tfsverity@lists.linux.dev,\n\tlinux-fsdevel@vger.kernel.org,\n\tebiggers@kernel.org", "Cc": "Andrey Albershteyn <aalbersh@kernel.org>,\n\thch@lst.de,\n\tlinux-ext4@vger.kernel.org,\n\tlinux-f2fs-devel@lists.sourceforge.net,\n\tlinux-btrfs@vger.kernel.org,\n\tdjwong@kernel.org", "Subject": "[PATCH v7 05/22] fsverity: pass digest size and hash of the\n all-zeroes block to ->write", "Date": "Thu, 9 Apr 2026 15:13:37 +0200", "Message-ID": "<20260409131404.1545834-6-aalbersh@kernel.org>", "X-Mailer": "git-send-email 2.51.2", "In-Reply-To": "<20260409131404.1545834-1-aalbersh@kernel.org>", "References": "<20260409131404.1545834-1-aalbersh@kernel.org>", "Precedence": "bulk", "X-Mailing-List": "linux-ext4@vger.kernel.org", "List-Id": "<linux-ext4.vger.kernel.org>", "List-Subscribe": "<mailto:linux-ext4+subscribe@vger.kernel.org>", "List-Unsubscribe": "<mailto:linux-ext4+unsubscribe@vger.kernel.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-Spam-Status": "No, score=-1.2 required=5.0 tests=ARC_SIGNED,ARC_VALID,\n\tDKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DMARC_PASS,\n\tMAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=disabled\n\tversion=4.0.1", "X-Spam-Checker-Version": "SpamAssassin 4.0.1 (2024-03-25) on gandalf.ozlabs.org" }, "content": "Let filesystem iterate over hashes in the block and check if these are\nhashes of zeroed data blocks. XFS will use this to decide if it want to\nstore tree block full of these hashes.\n\nSigned-off-by: Andrey Albershteyn <aalbersh@kernel.org>\nReviewed-by: \"Darrick J. Wong\" <djwong@kernel.org>\nAcked-by: Eric Biggers <ebiggers@kernel.org>\n---\n fs/btrfs/verity.c | 6 +++++-\n fs/ext4/verity.c | 4 +++-\n fs/f2fs/verity.c | 4 +++-\n fs/verity/enable.c | 4 +++-\n include/linux/fsverity.h | 6 +++++-\n 5 files changed, 19 insertions(+), 5 deletions(-)", "diff": "diff --git a/fs/btrfs/verity.c b/fs/btrfs/verity.c\nindex 0062b3a55781..fd3696d3f4ce 100644\n--- a/fs/btrfs/verity.c\n+++ b/fs/btrfs/verity.c\n@@ -773,11 +773,15 @@ static struct page *btrfs_read_merkle_tree_page(struct inode *inode,\n * @buf:\tMerkle tree block to write\n * @pos:\tthe position of the block in the Merkle tree (in bytes)\n * @size:\tthe Merkle tree block size (in bytes)\n+ * @zero_digest:\tthe hash of the all-zeroes block\n+ * @digest_size:\tsize of zero_digest, in bytes\n *\n * Returns 0 on success or negative error code on failure\n */\n static int btrfs_write_merkle_tree_block(struct file *file, const void *buf,\n-\t\t\t\t\t u64 pos, unsigned int size)\n+\t\t\t\t\t u64 pos, unsigned int size,\n+\t\t\t\t\t const u8 *zero_digest,\n+\t\t\t\t\t unsigned int digest_size)\n {\n \tstruct inode *inode = file_inode(file);\n \tloff_t merkle_pos = merkle_file_pos(inode);\ndiff --git a/fs/ext4/verity.c b/fs/ext4/verity.c\nindex ca61da53f313..347945ac23a4 100644\n--- a/fs/ext4/verity.c\n+++ b/fs/ext4/verity.c\n@@ -374,7 +374,9 @@ static void ext4_readahead_merkle_tree(struct inode *inode, pgoff_t index,\n }\n \n static int ext4_write_merkle_tree_block(struct file *file, const void *buf,\n-\t\t\t\t\tu64 pos, unsigned int size)\n+\t\t\t\t\tu64 pos, unsigned int size,\n+\t\t\t\t\tconst u8 *zero_digest,\n+\t\t\t\t\tunsigned int digest_size)\n {\n \tpos += ext4_verity_metadata_pos(file_inode(file));\n \ndiff --git a/fs/f2fs/verity.c b/fs/f2fs/verity.c\nindex 92ebcc19cab0..b3b3e71604ac 100644\n--- a/fs/f2fs/verity.c\n+++ b/fs/f2fs/verity.c\n@@ -270,7 +270,9 @@ static void f2fs_readahead_merkle_tree(struct inode *inode, pgoff_t index,\n }\n \n static int f2fs_write_merkle_tree_block(struct file *file, const void *buf,\n-\t\t\t\t\tu64 pos, unsigned int size)\n+\t\t\t\t\tu64 pos, unsigned int size,\n+\t\t\t\t\tconst u8 *zero_digest,\n+\t\t\t\t\tunsigned int digest_size)\n {\n \tpos += f2fs_verity_metadata_pos(file_inode(file));\n \ndiff --git a/fs/verity/enable.c b/fs/verity/enable.c\nindex 42dfed1ce0ce..ad4ff71d7dd9 100644\n--- a/fs/verity/enable.c\n+++ b/fs/verity/enable.c\n@@ -50,7 +50,9 @@ static int write_merkle_tree_block(struct file *file, const u8 *buf,\n \tint err;\n \n \terr = inode->i_sb->s_vop->write_merkle_tree_block(file, buf, pos,\n-\t\t\t\t\t\t\t params->block_size);\n+\t\t\t\t\t\t\t params->block_size,\n+\t\t\t\t\t\t\t params->zero_digest,\n+\t\t\t\t\t\t\t params->digest_size);\n \tif (err)\n \t\tfsverity_err(inode, \"Error %d writing Merkle tree block %lu\",\n \t\t\t err, index);\ndiff --git a/include/linux/fsverity.h b/include/linux/fsverity.h\nindex e4503312d114..a5645ec07aa8 100644\n--- a/include/linux/fsverity.h\n+++ b/include/linux/fsverity.h\n@@ -124,6 +124,8 @@ struct fsverity_operations {\n \t * @buf: the Merkle tree block to write\n \t * @pos: the position of the block in the Merkle tree (in bytes)\n \t * @size: the Merkle tree block size (in bytes)\n+\t * @zero_digest: the hash of the all-zeroes block\n+\t * @digest_size: size of zero_digest, in bytes\n \t *\n \t * This is only called between ->begin_enable_verity() and\n \t * ->end_enable_verity().\n@@ -131,7 +133,9 @@ struct fsverity_operations {\n \t * Return: 0 on success, -errno on failure\n \t */\n \tint (*write_merkle_tree_block)(struct file *file, const void *buf,\n-\t\t\t\t u64 pos, unsigned int size);\n+\t\t\t\t u64 pos, unsigned int size,\n+\t\t\t\t const u8 *zero_digest,\n+\t\t\t\t unsigned int digest_size);\n };\n \n #ifdef CONFIG_FS_VERITY\n", "prefixes": [ "v7", "05/22" ] }