From: sashiko-bot@kernel.org
To: "Andrey Albershteyn" <aalbersh@kernel.org>,
"Eric Biggers" <ebiggers@kernel.org>,
"Christoph Hellwig" <hch@lst.de>,
"Carlos Maiolino" <cem@kernel.org>,
fsverity <fsverity@lists.linux.dev>
Cc: david@fromorbit.com, "Darrick J. Wong" <djwong@kernel.org>
Subject: Re: [PATCH v19 15/15] xfs: enable ro-compat fs-verity flag
Date: Fri, 20 Nov 2026 16:38:01 +0000 [thread overview]
Message-ID: <sashiko-outbox-225580@kernel.org> (raw)
In-Reply-To: <20261120155752.192025-16-aalbersh@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] xfs: unhandled verity errors and uncleared sickness in
xchk_inode()
--
commit 895a6d1e83651f06565310457271bfd62d56550f
Author: Andrey Albershteyn <aalbersh@kernel.org>
xfs: enable ro-compat fs-verity flag
This commit enables the XFS_SB_FEAT_RO_COMPAT_VERITY superblock feature flag in
XFS_SB_FEAT_RO_COMPAT_ALL so that XFS filesystems with fs-verity can be
mounted.
> diff --git a/fs/xfs/libxfs/xfs_format.h b/fs/xfs/libxfs/xfs_format.h
> index 2cb375bdbd76b..16d6e8931df06 100644
> --- a/fs/xfs/libxfs/xfs_format.h
> +++ b/fs/xfs/libxfs/xfs_format.h
> @@ -378,8 +378,9 @@ xfs_sb_has_compat_feature(
> #define XFS_SB_FEAT_RO_COMPAT_ALL \
> (XFS_SB_FEAT_RO_COMPAT_FINOBT | \
> XFS_SB_FEAT_RO_COMPAT_RMAPBT | \
> - XFS_SB_FEAT_RO_COMPAT_REFLINK| \
> - XFS_SB_FEAT_RO_COMPAT_INOBTCNT)
> + XFS_SB_FEAT_RO_COMPAT_REFLINK | \
> + XFS_SB_FEAT_RO_COMPAT_INOBTCNT | \
> + XFS_SB_FEAT_RO_COMPAT_VERITY)
> #define XFS_SB_FEAT_RO_COMPAT_UNKNOWN ~XFS_SB_FEAT_RO_COMPAT_ALL
> static inline bool
> xfs_sb_has_ro_compat_feature(
[Severity: Medium]
Can online scrub and repair handle inodes whose fs-verity metadata fails
validation with -EINVAL or -EFBIG, and clear XFS_SICK_INO_FSVERITY after
repair?
In commit "xfs: check and repair the verity inode flag state",
xchk_inode_setup_verity() ignores several validation errnos from
fsverity_ensure_verity_info() so that scrub and repair can proceed:
fs/xfs/scrub/common.c:xchk_inode_setup_verity() {
...
error = fsverity_ensure_verity_info(VFS_I(sc->ip));
switch (error) {
case 0:
/* fsverity is active */
break;
case -ENODATA:
case -EMSGSIZE:
case -EFSCORRUPTED:
case -ERANGE:
case -EBADMSG:
/*
* The nonzero errno codes above are the error codes that can
* be returned from fsverity on metadata validation errors.
*/
return 0;
default:
/* runtime errors */
return error;
}
...
}
However, validate_fsverity_descriptor() returns -EINVAL for invalid descriptor
fields (such as bad version, non-zero reserved bytes, or data_size mismatch),
and fsverity_init_merkle_tree_params() returns -EINVAL or -EFBIG for invalid
hash algorithms, block sizes, or oversized Merkle trees. Because those hit the
default case, xchk_prepare_iscrub() and xrep_dinode_core() abort the scrub or
repair ioctl instead of flagging corruption or running xrep_inode_verity().
In addition, commit "xfs: introduce health state for corrupted fsverity
metadata" sets XFS_SICK_INO_FSVERITY on ip->i_sick when descriptor loading
fails, and includes it in XFS_SICK_INO_PRIMARY. Because
type_to_health_flag[XFS_SCRUB_TYPE_INODE] only maps to XFS_SICK_INO_CORE and
neither xchk_inode() nor xrep_inode_verity() adds XFS_SICK_INO_FSVERITY to
sc->healthy_mask, XFS_SICK_INO_FSVERITY remains set after repair and causes
xfs_inactive_health() to mark the AG sick with XFS_SICK_AG_INODES when the
inode is evicted.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261120155752.192025-1-aalbersh@kernel.org?part=15
prev parent reply other threads:[~2026-11-20 16:38 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 15:57 [PATCH v19 00/15] fs-verity support for XFS with post EOF merkle tree Andrey Albershteyn
2026-11-20 15:57 ` [PATCH v19 01/15] xfs: introduce fsverity on-disk changes Andrey Albershteyn
2026-11-20 16:26 ` sashiko-bot
2026-11-20 15:57 ` [PATCH v19 02/15] xfs: don't allow to enable DAX on fs-verity sealed inode Andrey Albershteyn
2026-11-20 15:57 ` [PATCH v19 03/15] xfs: disable direct read path for fs-verity files Andrey Albershteyn
2026-11-20 15:57 ` [PATCH v19 04/15] xfs: don't report dio_mem_align and dio_offset_align for fsverity files Andrey Albershteyn
2026-11-20 15:57 ` [PATCH v19 05/15] xfs: handle fsverity I/O in write/read path Andrey Albershteyn
2026-11-20 16:27 ` sashiko-bot
2026-11-20 15:57 ` [PATCH v19 06/15] xfs: use read ioend for fsverity data verification Andrey Albershteyn
2026-11-20 15:57 ` [PATCH v19 07/15] xfs: add XFS_BMAPI_UNWRITTEN to unmap unwritten extents in __xfs_bunmapi() Andrey Albershteyn
2026-11-20 15:57 ` [PATCH v19 08/15] xfs: don't remove written extents past EOF on fsverity inodes Andrey Albershteyn
2026-11-20 16:21 ` sashiko-bot
2026-11-20 15:57 ` [PATCH v19 09/15] xfs: add fs-verity support Andrey Albershteyn
2026-11-20 16:51 ` sashiko-bot
2026-11-20 15:57 ` [PATCH v19 10/15] xfs: initialize fs-verity on file open Andrey Albershteyn
2026-11-20 15:57 ` [PATCH v19 11/15] xfs: add fs-verity ioctls Andrey Albershteyn
2026-11-20 16:19 ` sashiko-bot
2026-11-20 15:57 ` [PATCH v19 12/15] xfs: advertise fs-verity being available on filesystem Andrey Albershteyn
2026-11-20 15:57 ` [PATCH v19 13/15] xfs: check and repair the verity inode flag state Andrey Albershteyn
2026-11-20 16:28 ` sashiko-bot
2026-11-20 15:57 ` [PATCH v19 14/15] xfs: introduce health state for corrupted fsverity metadata Andrey Albershteyn
2026-11-20 16:36 ` sashiko-bot
2026-11-20 15:57 ` [PATCH v19 15/15] xfs: enable ro-compat fs-verity flag Andrey Albershteyn
2026-11-20 16:38 ` sashiko-bot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-225580@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=aalbersh@kernel.org \
--cc=cem@kernel.org \
--cc=david@fromorbit.com \
--cc=djwong@kernel.org \
--cc=ebiggers@kernel.org \
--cc=fsverity@lists.linux.dev \
--cc=hch@lst.de \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox