lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250722183537.GU2672049@frogsfrogsfrogs>
Date: Tue, 22 Jul 2025 11:35:37 -0700
From: "Darrick J. Wong" <djwong@...nel.org>
To: Christoph Hellwig <hch@...radead.org>
Cc: cen zhang <zzzccc427@...il.com>, cem@...nel.org,
	linux-kernel@...r.kernel.org, baijiaju1990@...il.com,
	zhenghaoran154@...il.com, r33s3n6@...il.com, gality365@...il.com,
	linux-xfs@...r.kernel.org
Subject: Re: [BUG] xfs: Assertion failed in xfs_iwalk_args triggered by
 XFS_IOC_INUMBERS

On Sun, Jul 20, 2025 at 11:34:06PM -0700, Christoph Hellwig wrote:
> The patch below should fix the issue.  But I wonder if we should split
> the flags a bit better to make things more obvious.

We did in [1], but did you have something else in mind?

[1] https://lore.kernel.org/linux-xfs/20220321051750.400056-18-chandan.babu@oracle.com/

> diff --git a/fs/xfs/xfs_itable.c b/fs/xfs/xfs_itable.c
> index c8c9b8d8309f..302efe54e2af 100644
> --- a/fs/xfs/xfs_itable.c
> +++ b/fs/xfs/xfs_itable.c
> @@ -457,7 +457,8 @@ xfs_inumbers(
>  	 * locking abilities to detect cycles in the inobt without deadlocking.
>  	 */
>  	tp = xfs_trans_alloc_empty(breq->mp);
> -	error = xfs_inobt_walk(breq->mp, tp, breq->startino, breq->flags,
> +	error = xfs_inobt_walk(breq->mp, tp, breq->startino,
> +			breq->flags & XFS_IBULK_SAME_AG,

That's correct -- the only IBULK flag with meaning for xfs_inobt_walk is
SAME_AG because the others affect bulkstat output.

But it might be clearer to make this explicit the same way that
xfs_bulkstat does:

	unsigned int iwalk_flags = 0;

	if (breq->flags & XFS_IBULK_SAME_AG)
		iwalk_flags |= XFS_IWALK_SAME_AG;

	error = xfs_inobt_walk(..., iwalk_flags, ...);

This probably should have been included in [1] so:

Cc: <stable@...r.kernel.org> # v5.19
Fixes: 5b35d922c52798 ("xfs: Decouple XFS_IBULK flags from XFS_IWALK flags")

--D

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ