Re: [PATCH 2/2] vfs/idmapped_mounts.c: Change mount_setattr expected output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 26, 2024 at 08:33:52PM +0000, Taylor Jackson via B4 Relay wrote:
> From: Taylor Jackson <tjackson9431@xxxxxxxxx>
> 
> In kernel commit dacfd001eaf2 (“fs/mnt_idmapping.c: Return -EINVAL
> when no map is written”), the behavior of mount_setattr changed to
> return EINVAL when attempting to create an idmapped mount when using
> a user namespace with no mappings. The following commit updates the test
> to expect no mount to be created in that case. And since no mount is created,
> this commit also removes the check for overflow IDs because it does not make
> sense to check for overflow IDs for a mount that was not created.
> 
> Signed-off-by: Taylor Jackson <tjackson9431@xxxxxxxxx>
> ---

Thanks for fixing this!
Reviewed-by: Christian Brauner <brauner@xxxxxxxxxx>

>  src/vfs/idmapped-mounts.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/src/vfs/idmapped-mounts.c b/src/vfs/idmapped-mounts.c
> index 34052ca3..f4dfc3f3 100644
> --- a/src/vfs/idmapped-mounts.c
> +++ b/src/vfs/idmapped-mounts.c
> @@ -6667,7 +6667,7 @@ static int nested_userns(const struct vfstest_info *info)
>  	}
>  
>  	if (sys_mount_setattr(fd_open_tree_level4, "", AT_EMPTY_PATH,
> -			      &attr_level4, sizeof(attr_level4))) {
> +			      &attr_level4, sizeof(attr_level4)) != -1 || errno != EINVAL) {
>  		log_stderr("failure: sys_mount_setattr");
>  		goto out;
>  	}
> @@ -6706,11 +6706,6 @@ static int nested_userns(const struct vfstest_info *info)
>  			log_stderr("failure: check ownership %s", file);
>  			goto out;
>  		}
> -
> -		if (!expected_uid_gid(fd_open_tree_level4, file, 0, info->t_overflowuid, info->t_overflowgid)) {
> -			log_stderr("failure: check ownership %s", file);
> -			goto out;
> -		}
>  	}
>  
>  	/* Verify that ownership looks correct for callers in the first userns. */
> 
> -- 
> 2.34.1
> 
> 

On Tue, Mar 26, 2024 at 08:22:28AM -0700, Darrick J. Wong wrote:
> On Tue, Mar 26, 2024 at 12:43:27PM +0100, Christian Brauner wrote:
> > On Mon, Mar 25, 2024 at 09:58:09AM -0700, Darrick J. Wong wrote:
> > > On Tue, Feb 20, 2024 at 09:57:30AM +0100, Christian Brauner wrote:
> > > > On Mon, Feb 19, 2024 at 02:55:42PM +0800, kernel test robot wrote:
> > > > > 
> > > > > 
> > > > > Hello,
> > > > > 
> > > > > kernel test robot noticed "xfstests.generic.645.fail" on:
> > > > > 
> > > > > commit: b4291c7fd9e550b91b10c3d7787b9bf5be38de67 ("fs/mnt_idmapping.c: Return -EINVAL when no map is written")
> > > > > https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git master
> > > > 
> > > > The test needs to be updated. We now explicitly fail when no map is
> > > > written.
> > > 
> > > Has there been any progress on updating generic/645?  6.9-rc1 is out,
> > > and Dave and I have both noticed this regressing.
> > 
> > Iirc, Taylor wanted to fix this but it seems that hasn't happened yet.
> > I'll ping again and if nothing's happened until tomorrow I'll send a
> > patch.
> 
> Ok, glad to hear that this is still on your radar.  Thank you for
> following up!

@Darrick, Taylor sent fixes for this now (I've took the liberty to
respond to both mails combined.).




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux