From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794063131; b=m3ddom8kS+y4ITgZkxONBNw0OkO4kwVtFVgGw5yJ9XUd4CK27PHBlkJ/FNBVa7y/+0WX uyCu3dqiiH7IgK74UMLu+SSBfhdpxo9z5hb44wkTL6685irYtrieK831mhsyW7MyMFc3c dZ2hTvSH1x55w5y6Xv7suTRT02A2beEBLRMwfGnMpl0kR5HAz2Z8Nz3Bx22J4oP3hYYdF MB8BEPfSLtcnHakVfB8QLjab4Jgdt1jEYNjFV8rd5dBGArzuntNpvArmn8N6miQM5HDkN uiHygIqCa6szSbUcQPxyvZSTTA9ne4SL+AdL557RCAYrMuRMcBhTjSMBS6t7hk9wZMA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794063131; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=au29QMw0Fnc+Rb4Sb36dQtsDJYfZ1v9VYolKhsQMdcE=; b=xyuiXm5I5v9CqIxY6TUiAL4isu9CcnC+4ID2l0Aq3xfQjIsu8NQ7u+1rHBJpIUCGQHGr pXOqs9MkDCe78ORcZKJjsIpySZXS82LSVqkXMo1ETzlOB9s61I4ufMWMXZtxOgpP/hBVn M4hiC4QEN2ik/9E6MGaUcagtZ/J7ktXKHsPZKQRhX3P46DMIUhAfdfC4WrURrynu6wxrv wUqpc1prBlt5D0Y2eZeJDDTqZHhXu3B1Y/77TFfcrS+iSLXT9/qBdmC7iZAzlPWPKCRiq c4XR6uBlyFzmhzUQBdT+YAAe4Ef0dFbxfOBTa0LH6IRyc/Jb55EZk/IPZFWRjQRRg7A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=CJCynAwj; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 559F6606A330; Sat, 7 Nov 2026 14:52:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=CJCynAwj Received: by smtp.kernel.org (Postfix) with ESMTPSA id 046EA1F0089F; Sat, 7 Nov 2026 14:52:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1794063131; bh=au29QMw0Fnc+Rb4Sb36dQtsDJYfZ1v9VYolKhsQMdcE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=CJCynAwj7UBFKiUxeP6EM19Fb5n250iRD/S7r4UEEJdi6HoUsg0hKDhtgSdKII9uY r5Frl2cTCAEfjwlfwDLI1QSrIiE/g2759erGYc07FqX0lfQUghpbqifW5hgq2wSghN T3C5Zs/dOP0sMvnBJODK536ZdAyvs9ChQSEoVJxc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Andrey Albershteyn , Eric Biggers , Christoph Hellwig , "Darrick J. Wong" , Sasha Levin Subject: [PATCH 6.18 361/869] fsverity: hoist statx reporting of fs-verity flag Date: Sat, 7 Nov 2026 08:50:43 -0500 Message-ID: <20261107134904.737548425@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261107134852.069646174@linuxfoundation.org> References: <20261107134852.069646174@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Andrey Albershteyn [ Upstream commit f9e450420da2624c93ce9585deebfabb87932774 ] All filesystems, supporting fsverity, report this status by checking inode flag. Also, BTRFS was missing stat->attributes_mask, which is fixed now. Fixes: 146054090b08 ("btrfs: initial fsverity support") Cc: stable@vger.kernel.org Signed-off-by: Andrey Albershteyn Acked-by: Eric Biggers Reviewed-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Link: https://patch.msgid.link/20261002223705.2175542-7-aalbersh@kernel.org Signed-off-by: Eric Biggers Signed-off-by: Sasha Levin --- fs/btrfs/inode.c | 3 --- fs/ext4/inode.c | 5 +---- fs/f2fs/file.c | 5 +---- fs/stat.c | 6 +++++- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 62858d8d66bd6..6287e15bce110 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -8143,7 +8143,6 @@ static int btrfs_getattr(struct mnt_idmap *idmap, struct inode *inode = d_inode(path->dentry); u32 blocksize = btrfs_sb(inode->i_sb)->sectorsize; u32 bi_flags = BTRFS_I(inode)->flags; - u32 bi_ro_flags = BTRFS_I(inode)->ro_flags; stat->result_mask |= STATX_BTIME; stat->btime.tv_sec = BTRFS_I(inode)->i_otime_sec; @@ -8156,8 +8155,6 @@ static int btrfs_getattr(struct mnt_idmap *idmap, stat->attributes |= STATX_ATTR_IMMUTABLE; if (bi_flags & BTRFS_INODE_NODUMP) stat->attributes |= STATX_ATTR_NODUMP; - if (bi_ro_flags & BTRFS_INODE_RO_VERITY) - stat->attributes |= STATX_ATTR_VERITY; stat->attributes_mask |= (STATX_ATTR_APPEND | STATX_ATTR_COMPRESSED | diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index c3fb5f16f6e39..ed51c11f43ffb 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -6216,15 +6216,12 @@ int ext4_getattr(struct mnt_idmap *idmap, const struct path *path, stat->attributes |= STATX_ATTR_IMMUTABLE; if (flags & EXT4_NODUMP_FL) stat->attributes |= STATX_ATTR_NODUMP; - if (flags & EXT4_VERITY_FL) - stat->attributes |= STATX_ATTR_VERITY; stat->attributes_mask |= (STATX_ATTR_APPEND | STATX_ATTR_COMPRESSED | STATX_ATTR_ENCRYPTED | STATX_ATTR_IMMUTABLE | - STATX_ATTR_NODUMP | - STATX_ATTR_VERITY); + STATX_ATTR_NODUMP); generic_fillattr(idmap, request_mask, inode, stat); return 0; diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 791f1cf198c16..49febaa660815 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -1058,15 +1058,12 @@ int f2fs_getattr(struct mnt_idmap *idmap, const struct path *path, stat->attributes |= STATX_ATTR_IMMUTABLE; if (flags & F2FS_NODUMP_FL) stat->attributes |= STATX_ATTR_NODUMP; - if (IS_VERITY(inode)) - stat->attributes |= STATX_ATTR_VERITY; stat->attributes_mask |= (STATX_ATTR_COMPRESSED | STATX_ATTR_APPEND | STATX_ATTR_ENCRYPTED | STATX_ATTR_IMMUTABLE | - STATX_ATTR_NODUMP | - STATX_ATTR_VERITY); + STATX_ATTR_NODUMP); generic_fillattr(idmap, request_mask, inode, stat); diff --git a/fs/stat.c b/fs/stat.c index 8c110555b3d7b..3bc049f0bc3dd 100644 --- a/fs/stat.c +++ b/fs/stat.c @@ -203,8 +203,12 @@ int vfs_getattr_nosec(const struct path *path, struct kstat *stat, if (IS_DAX(inode)) stat->attributes |= STATX_ATTR_DAX; + if (IS_VERITY(inode)) + stat->attributes |= STATX_ATTR_VERITY; + stat->attributes_mask |= (STATX_ATTR_AUTOMOUNT | - STATX_ATTR_DAX); + STATX_ATTR_DAX | + STATX_ATTR_VERITY); idmap = mnt_idmap(path->mnt); if (inode->i_op->getattr) { -- 2.53.0