From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 144DEF36C5D for ; Mon, 20 Apr 2026 11:47:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type:Cc: Reply-To:From:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Subject:MIME-Version:References:In-Reply-To: Message-ID:Date:To:Sender:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=OSPDeUzN+piD85IwWp7HIv9mS7vhKpIEaHnbpJEBEYk=; b=PRgLH4NcDbAJBe/70x8lsgiPz/ Se89lNQUnzdIJSXr8+itnWVf5kKw+1dq7DB9L6PE4tuwd2LOd/Wa7SrUymIlqgCr+nf2n40sjk3VP iwPeywIPpbJGPrJ49xYDKbCGQzPZQ9gN8TeAabwCzpc+jVkiLo1qSd+WQQwpHtNqWxWU=; Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1wEn6U-0003nE-K6; Mon, 20 Apr 2026 11:47:51 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1wEn6S-0003my-Fc for linux-f2fs-devel@lists.sourceforge.net; Mon, 20 Apr 2026 11:47:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Q24umAnIhjJWMMv84GCWO2VASOQlpvqwGDh+ApTBnaM=; b=nFaAdCJYpJT8YCy2bmmMjUNIIG t0VN2jGnnhf7s5uMgwpVLTKvYGXYBm+TVn9jn1OsKH3EmpuvGsEV1qaVvqG7KYI7MXhZvE0o8rRCZ 6uUS3aodduSi+ACh04ngbpCGZevPOuENGH3aOJ9zevPKMxFwYiGjIVYYlDewf+060k/g=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Q24umAnIhjJWMMv84GCWO2VASOQlpvqwGDh+ApTBnaM=; b=LGW64skDQXJJD7K2zB5Iq8MkqG Nc/bDjLKdHWitvhL5n9+SmOsSyQeNamAxYiCzwgEptiBsVtGORukLtlglJjdD5tJ+z0eAuPoZ2E4e YHn1b3S394f/rTLnNB2hf6hT3EMarUkRfLJ3Ed40BNY287lWWM45Lsy3pco13uzFR/ig=; Received: from sea.source.kernel.org ([172.234.252.31]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1wEn6S-0007D0-Rm for linux-f2fs-devel@lists.sourceforge.net; Mon, 20 Apr 2026 11:47:49 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 476E540A70; Mon, 20 Apr 2026 11:47:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AA527C2BCB4; Mon, 20 Apr 2026 11:47:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1776685658; bh=xdJuXteL2kuBB7E/JnTWxaOughFhLnHqfW8AFjBOmQ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DBF//XywCr8BGCIuJa3b76GrPWC/8+zEONRFrtGV1d1TBbYA6kscx5jC7NRw/wF7b Vru688576PvEEAG8YKzIkBIcClu2teEGqwQeLZTQB+eYiMt891X9czT7FNjelIyThM Gy9PGHHhEHMYXYYwyg9Uggl1KrhuN7Xw2301dA4IZcvQSGC5b251/JDaB7RzvbQrkr cdQ01kwTHwF+Am+GaY0DeMZ7yH3f8terH+fgDqTktnnOrzmweY4ZkRV853n1Z7G5AI b8Dw978Zfl5EX7e91JjRWsapdjYJuJ07w+9mNd3yOv9Bw9c+t2kiYkf+DKBJYvPXVG 4O5AI07vjX9eQ== To: linux-xfs@vger.kernel.org, fsverity@lists.linux.dev, linux-fsdevel@vger.kernel.org, ebiggers@kernel.org Date: Mon, 20 Apr 2026 13:46:48 +0200 Message-ID: <20260420114714.1621982-2-aalbersh@kernel.org> X-Mailer: git-send-email 2.51.2 In-Reply-To: <20260420114714.1621982-1-aalbersh@kernel.org> References: <20260420114714.1621982-1-aalbersh@kernel.org> MIME-Version: 1.0 X-Headers-End: 1wEn6S-0007D0-Rm Subject: [f2fs-dev] [PATCH v8 01/22] fsverity: report validation errors through fserror to fsnotify X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Andrey Albershteyn via Linux-f2fs-devel Reply-To: Andrey Albershteyn Cc: Andrey Albershteyn , djwong@kernel.org, linux-unionfs@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-ext4@vger.kernel.org, hch@lst.de, linux-btrfs@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net Reported verification errors to fsnotify through recently added fserror interface. Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Acked-by: Eric Biggers Signed-off-by: Andrey Albershteyn --- fs/verity/verify.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/verity/verify.c b/fs/verity/verify.c index 4004a1d42875..db8c350234bb 100644 --- a/fs/verity/verify.c +++ b/fs/verity/verify.c @@ -9,6 +9,7 @@ #include #include +#include #define FS_VERITY_MAX_PENDING_BLOCKS 2 @@ -205,6 +206,8 @@ static bool verify_data_block(struct fsverity_info *vi, if (memchr_inv(dblock->data, 0, params->block_size)) { fsverity_err(inode, "FILE CORRUPTED! Data past EOF is not zeroed"); + fserror_report_data_lost(inode, data_pos, + params->block_size, GFP_NOFS); return false; } return true; @@ -312,6 +315,7 @@ static bool verify_data_block(struct fsverity_info *vi, data_pos, level - 1, params->hash_alg->name, hsize, want_hash, params->hash_alg->name, hsize, level == 0 ? dblock->real_hash : real_hash); + fserror_report_data_lost(inode, data_pos, params->block_size, GFP_NOFS); error: for (; level > 0; level--) { kunmap_local(hblocks[level - 1].addr); -- 2.51.2 _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel