From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A35283C4555; Fri, 2 Oct 2026 22:37:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790980637; cv=none; b=GH73VVQOPRoKHsiPH+3LXnggZOIcsq6Svd2GRE+WQUUbbRiJIP6oQdOQTWF2Scd08ox1YpY3n5xoIKTB3ICtbcCOUn7lDDuoF68ab9aTzyZE3vQPI+S45Gl9HTWznH4e80PBoulRmurq4FrOwX02gx72F67DNY4wlEZOmMG+9j8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790980637; c=relaxed/simple; bh=gNzjl4zWpkZJaicQjAemkaolWXKfIV765MdaOnGpKBs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UXPLdHZl5HS9kUSzsctWzRoNG3WwVMfuOzFsJS75NYPZK0udEx3Nj9cGDm/9QY4ABgUx8jNdPJp7ez00jqdiR1B2mCTGNKd1wROHj5hJtZUsfRrBs241LW5WiNDSiDuIlOIhVCy8YEgHxKn/ugkTbZ3u7vffX2e89eNkKowMnj8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZEweSho/; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZEweSho/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 481D41F00898; Fri, 2 Oct 2026 22:37:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1790980636; bh=DLKRiRyzKQ3SHGS6qPdEtB2Y8TKgDvD/nkziuhY4NXk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ZEweSho/Cwzs8/LsKlvQTc806l+Oz7mlND6yQYJfioYraHnXayhEJgpZNG/TvL5Jx rnK1B9nLtK47IFPwqo20gBoXEhnyzaisrJxQQR7QObLFPHT4rLn3EC+OXQb5aHlux6 mQADUBJU1Zl31qTt0XipmQlRk8Y2uerVbwMdp+3+bYDkxlUK+dOVVSdaACWBqjXw7n mEnUl/XSJhF5xW0LUgQNu3h8/j8K4o0OeRgEDJ07v+1PLu3we1BdHqSCE4HUsL7r1f DCtunj5aVzhn/Fe60RABJvgfGYuCIiVnIZCJMvC2abqh6LXBdWmfkDYfR5SrawG/Pb tUEVRYEwcmCbA== From: Andrey Albershteyn To: djwong@kernel.org, ebiggers@kernel.org, hch@lst.de, Carlos Maiolino Cc: Andrey Albershteyn , fsverity@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-unionfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-btrfs@vger.kernel.org, david@fromorbit.com Subject: [PATCH v17 01/21] fsverity: report validation errors through fserror to fsnotify Date: Sat, 3 Oct 2026 00:36:42 +0200 Message-ID: <20261002223705.2175542-2-aalbersh@kernel.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20261002223705.2175542-1-aalbersh@kernel.org> References: <20261002223705.2175542-1-aalbersh@kernel.org> Precedence: bulk X-Mailing-List: fsverity@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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.54.0 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 65C69CA5FE6 for ; Fri, 2 Oct 2026 22:37:27 +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=eBatrioos2NNhuN86FzAWnd2XUGGIpe9YQd5qsL6mRo=; b=ghhnc5lIMYxorCDnjhEtvsqTDo r9SMJE8q+lBInhPZpF140wa3vdjJLkIq1YwuQyTF7F50OmT21YkbzCQQQJHFUYwqBmdvE56Xuw4sr q5MiZ2VUUK0z/4047YNsDbYYbRh9We2/W6mV/8s2u+VWGZN2QTjXmT2TuXIBIqk961yk=; Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1xClsZ-0003Zx-Tg; Fri, 02 Oct 2026 22:37:24 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1xClsY-0003Zp-D7 for linux-f2fs-devel@lists.sourceforge.net; Fri, 02 Oct 2026 22:37:23 +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=DLKRiRyzKQ3SHGS6qPdEtB2Y8TKgDvD/nkziuhY4NXk=; b=TKgiXzmsyF4PWAbktRxpoQyBzo +uaqcEl3hjxMiIseE+cLCZhyL236izBdZ13xLVNl7QhoaNiCRvNEN2nzYTqqPi84Kokj7gKW4Ca9+ KvEk9/S3o/wDp4rPciuJs7YQ18wuk/d4Yz9ydebWZUEICqviUc/ATvHr17VtY3sIsCFg=; 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=DLKRiRyzKQ3SHGS6qPdEtB2Y8TKgDvD/nkziuhY4NXk=; b=PnZC5nP8bOeUju1HTfdyhGZyAj 9jEEfFRBGkdMd1Hx5ZIhN3cZLrUB1ZDDM4309k24Ff8kFdrtwmwdZ296+jL1N6l6db6hi2bfWewpF 3gcRbX+aSgiCc3Ytk2zb4UtDgKw085NBn05oTXAXK/zabgKrUGX0ww5O0dpcYonoMZpE=; 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 1xClsX-0006aa-OI for linux-f2fs-devel@lists.sourceforge.net; Fri, 02 Oct 2026 22:37:23 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 66C6B4480F; Fri, 2 Oct 2026 22:37:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 481D41F00898; Fri, 2 Oct 2026 22:37:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1790980636; bh=DLKRiRyzKQ3SHGS6qPdEtB2Y8TKgDvD/nkziuhY4NXk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ZEweSho/Cwzs8/LsKlvQTc806l+Oz7mlND6yQYJfioYraHnXayhEJgpZNG/TvL5Jx rnK1B9nLtK47IFPwqo20gBoXEhnyzaisrJxQQR7QObLFPHT4rLn3EC+OXQb5aHlux6 mQADUBJU1Zl31qTt0XipmQlRk8Y2uerVbwMdp+3+bYDkxlUK+dOVVSdaACWBqjXw7n mEnUl/XSJhF5xW0LUgQNu3h8/j8K4o0OeRgEDJ07v+1PLu3we1BdHqSCE4HUsL7r1f DCtunj5aVzhn/Fe60RABJvgfGYuCIiVnIZCJMvC2abqh6LXBdWmfkDYfR5SrawG/Pb tUEVRYEwcmCbA== To: djwong@kernel.org, ebiggers@kernel.org, hch@lst.de, Carlos Maiolino Date: Sat, 3 Oct 2026 00:36:42 +0200 Message-ID: <20261002223705.2175542-2-aalbersh@kernel.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20261002223705.2175542-1-aalbersh@kernel.org> References: <20261002223705.2175542-1-aalbersh@kernel.org> MIME-Version: 1.0 X-Headers-End: 1xClsX-0006aa-OI Subject: [f2fs-dev] [PATCH v17 01/21] 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: fsverity@lists.linux.dev, Andrey Albershteyn , david@fromorbit.com, linux-unionfs@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, 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.54.0 _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel