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 B980140B6F9; Fri, 14 Aug 2026 09:27:20 +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=1786699641; cv=none; b=ukyWHIgz4z9NP62736tYBgudhFaCg0bLCE3NBEMiL6c6Y1ktaZky8Tyo3B0e3xq7YPyQ0GEcsbmv6Uu9IczoBaOmHnh2M/Lbfo+X+LUUVVbiqtvezkpkbU4sg0znFrDfeloscFqM9qmfsI4LW0BSofwcbevVnH5JrVpt+xUB7mo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786699641; c=relaxed/simple; bh=VelucZJPsab2F5jxEpX3NBOniOMrZ0GVGPAxyUbHahM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Dc+QkF5fhrv0c2uhjldPfSaLt2dAej+LnPAlU5pt8RU76uvSUAz/hRPjNRT2rMzO7eRQGcXJjioFd+T8BJ2Zpl0JDCS7ZTKQWMq8uO4DLUJukC75QGaLf6nfv+3dken4VoAh58/t6dlcxuTerkGI96lSuGzAgJ4/kjUlNhBf3sA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HonV7aqf; 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="HonV7aqf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 158541F00A3D; Fri, 14 Aug 2026 09:27:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1786699640; bh=dse18FWQSUIoP6yquYEBISwJ2j8wLduiXGfJxJRjVuc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=HonV7aqfeQsMGvoCrLXNJWRL8SiztkR8OhKouolUR45inLrS6t/Ein2YBoSi/i4hS RoU0RmnrN0tgf2wga5a7DPKlexWrUKwBH2zrOgQPTlgqTigIwZBuuvSzyMReUxsncK P1d2xSMwuLzHQ5knbrPlKDXCfri3rDlWG1rcTf8YYam0OwxOnWeJHyDGgsV0joue9N MAgEa+FePdFgHpAs+lCnWtohVGKMc/EX6PWw13mRjAPNd/xlQQb23MLVGQstZ4VSBv X76/PJoS3GHGrDtwKbrAoe6UJ19C4rNFxkikJl+69l3m2x28QPk1/j4RSyY1oYA1l3 Hxira+zhhGE8Q== From: Andrey Albershteyn To: djwong@kernel.org, ebiggers@kernel.org, hch@lst.de, Jens Axboe , 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-block@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-btrfs@vger.kernel.org, david@fromorbit.com, Tal Zussman Subject: [PATCH v15 21/25] xfs: add fs-verity ioctls Date: Fri, 14 Aug 2026 11:24:38 +0200 Message-ID: <20260814092448.1818082-22-aalbersh@kernel.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260814092448.1818082-1-aalbersh@kernel.org> References: <20260814092448.1818082-1-aalbersh@kernel.org> Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add fs-verity ioctls to enable, dump metadata (descriptor and Merkle tree pages) and obtain file's digest. [djwong: remove unnecessary casting] Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Andrey Albershteyn --- fs/xfs/xfs_ioctl.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c index 1b53701bebea..fc7860a8b5ab 100644 --- a/fs/xfs/xfs_ioctl.c +++ b/fs/xfs/xfs_ioctl.c @@ -49,6 +49,7 @@ #include #include +#include /* Return 0 on success or positive error */ int @@ -1466,6 +1467,19 @@ xfs_file_ioctl( case XFS_IOC_VERIFY_MEDIA: return xfs_ioc_verify_media(filp, arg); + case FS_IOC_ENABLE_VERITY: + if (!xfs_has_verity(mp)) + return -EOPNOTSUPP; + return fsverity_ioctl_enable(filp, arg); + case FS_IOC_MEASURE_VERITY: + if (!xfs_has_verity(mp)) + return -EOPNOTSUPP; + return fsverity_ioctl_measure(filp, arg); + case FS_IOC_READ_VERITY_METADATA: + if (!xfs_has_verity(mp)) + return -EOPNOTSUPP; + return fsverity_ioctl_read_metadata(filp, arg); + default: return -ENOTTY; } -- 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 D6299C5B572 for ; Fri, 14 Aug 2026 09:27:35 +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=ma8tjkLhlpwZhUjd2qQfea5t6vT3XjEPacQZbUIS1wA=; b=Nn1pUydSQuiizk+6jv66LE5BaD 3Ec0XlqqPKRUAwB59pPx4KDuBHOO41UhoxUbq40PLkfIANFUHMIegpTy3IW84egisI4+Ex/9GTeOx 3OKGmW6BeJfDBC011vNanSP7DH/BJdM+QpuEEVPX3V/09Zu3mgEmafVhLqTpO2sHh3xc=; Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1wuoCM-0006R4-66; Fri, 14 Aug 2026 09:27:34 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1wuoCK-0006Qn-RE for linux-f2fs-devel@lists.sourceforge.net; Fri, 14 Aug 2026 09:27:32 +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=dse18FWQSUIoP6yquYEBISwJ2j8wLduiXGfJxJRjVuc=; b=Id2HrR/d6ZQZYrjyHat1CBMVRS KSu/S/JRqkS8En5x6W8rA+glyDtNSy1dvJboa4pDAbTYlkjdKPDZmJxjykyNuSPmDNR0TFFpLfzPf Q2tM9TOPqVbY+Kz7DRDY0YNL4I0orkEhc0V7iuBgzJt4a5sjM2aH3k84fcFWDWInqXls=; 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=dse18FWQSUIoP6yquYEBISwJ2j8wLduiXGfJxJRjVuc=; b=kUKB0kC8eSNI1fDy0m23e5CeED OO35UMeN5uH5Rordw7pIlBm/qYG6yFWjKi+q+w9u29bOWstmZD71UJuoELOLVsH8GiseTAmP6mYp1 X1OHu/kK+0IFStJxmJPUOoozIiMM0JcDc0JakSeUQw5N6ZSL/P6h2Xfo4lmXGZVwA08o=; Received: from tor.source.kernel.org ([172.105.4.254]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1wuoCI-0000rc-16 for linux-f2fs-devel@lists.sourceforge.net; Fri, 14 Aug 2026 09:27:32 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id E846860A72; Fri, 14 Aug 2026 09:27:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 158541F00A3D; Fri, 14 Aug 2026 09:27:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1786699640; bh=dse18FWQSUIoP6yquYEBISwJ2j8wLduiXGfJxJRjVuc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=HonV7aqfeQsMGvoCrLXNJWRL8SiztkR8OhKouolUR45inLrS6t/Ein2YBoSi/i4hS RoU0RmnrN0tgf2wga5a7DPKlexWrUKwBH2zrOgQPTlgqTigIwZBuuvSzyMReUxsncK P1d2xSMwuLzHQ5knbrPlKDXCfri3rDlWG1rcTf8YYam0OwxOnWeJHyDGgsV0joue9N MAgEa+FePdFgHpAs+lCnWtohVGKMc/EX6PWw13mRjAPNd/xlQQb23MLVGQstZ4VSBv X76/PJoS3GHGrDtwKbrAoe6UJ19C4rNFxkikJl+69l3m2x28QPk1/j4RSyY1oYA1l3 Hxira+zhhGE8Q== To: djwong@kernel.org, ebiggers@kernel.org, hch@lst.de, Jens Axboe , Carlos Maiolino Date: Fri, 14 Aug 2026 11:24:38 +0200 Message-ID: <20260814092448.1818082-22-aalbersh@kernel.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260814092448.1818082-1-aalbersh@kernel.org> References: <20260814092448.1818082-1-aalbersh@kernel.org> MIME-Version: 1.0 X-Headers-End: 1wuoCI-0000rc-16 Subject: [f2fs-dev] [PATCH v15 21/25] xfs: add fs-verity ioctls 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, linux-xfs@vger.kernel.org, Andrey Albershteyn , david@fromorbit.com, linux-unionfs@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, Tal Zussman , 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 Add fs-verity ioctls to enable, dump metadata (descriptor and Merkle tree pages) and obtain file's digest. [djwong: remove unnecessary casting] Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Andrey Albershteyn --- fs/xfs/xfs_ioctl.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c index 1b53701bebea..fc7860a8b5ab 100644 --- a/fs/xfs/xfs_ioctl.c +++ b/fs/xfs/xfs_ioctl.c @@ -49,6 +49,7 @@ #include #include +#include /* Return 0 on success or positive error */ int @@ -1466,6 +1467,19 @@ xfs_file_ioctl( case XFS_IOC_VERIFY_MEDIA: return xfs_ioc_verify_media(filp, arg); + case FS_IOC_ENABLE_VERITY: + if (!xfs_has_verity(mp)) + return -EOPNOTSUPP; + return fsverity_ioctl_enable(filp, arg); + case FS_IOC_MEASURE_VERITY: + if (!xfs_has_verity(mp)) + return -EOPNOTSUPP; + return fsverity_ioctl_measure(filp, arg); + case FS_IOC_READ_VERITY_METADATA: + if (!xfs_has_verity(mp)) + return -EOPNOTSUPP; + return fsverity_ioctl_read_metadata(filp, arg); + default: return -ENOTTY; } -- 2.54.0 _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel