linux-next: manual merge of the pidfd tree with the xfs tree
Hi all,
Today's linux-next merge of the pidfd tree got a conflict in:
fs/xfs/xfs_inode.c
between commit:
01ea173e103e ("xfs: fix up non-directory creation in SGID directories")
from the xfs tree and commit:
f736d93d76d3 ("xfs: support idmapped mounts")
from the pidfd tree.
I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
Signature · 27 lines
Cheers,
Stephen Rothwell
diff --cc fs/xfs/xfs_inode.c
index e2a1db4cee43,95b7f2ba4e06..000000000000
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@@ -809,13 -810,13 +810,13 @@@ xfs_init_new_inode
inode->i_rdev = rdev;
ip->i_d.di_projid = prid;
- if (pip && XFS_INHERIT_GID(pip)) {
- inode->i_gid = VFS_I(pip)->i_gid;
- if ((VFS_I(pip)->i_mode & S_ISGID) && S_ISDIR(mode))
- inode->i_mode |= S_ISGID;
+ if (dir && !(dir->i_mode & S_ISGID) &&
+ (mp->m_flags & XFS_MOUNT_GRPID)) {
+ inode->i_uid = current_fsuid();
+ inode->i_gid = dir->i_gid;
+ inode->i_mode = mode;
} else {
- inode_init_owner(inode, dir, mode);
- inode->i_gid = fsgid_into_mnt(mnt_userns);
++ inode_init_owner(mnt_userns, inode, dir, mode);
}
/*Hi all,
Quoted 27 lines · On Mon, 25 Jan 2021 17:14:14 +1100 Stephen Rothwell <[email protected]>…
Today's linux-next merge of the pidfd tree got a conflict in:
fs/xfs/xfs_inode.cbetween commit:
01ea173e103e("xfs: fix up non-directory creation in SGID directories")from the xfs tree and commit:
f736d93d76d3("xfs: support idmapped mounts")from the pidfd tree.
I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
fs/xfs/xfs_inode.c +0
-0
fs/xfs/xfs_inode.c
Quoted 10 lines
fs/xfs/xfs_inode.c +0
-0@@@ -809,13 -810,13 +810,13 @@@ xfs_init_new_inode inode->i_rdev = rdev; ip->i_d.di_projid = prid; - if (pip && XFS_INHERIT_GID(pip)) { - inode->i_gid =VFS_I (pip)->i_gid; - if ((VFS_I(pip)->i_mode & S_ISGID) && S_ISDIR(mode)) - inode->i_mode |=S_ISGID ; + if (dir && !(dir->i_mode & S_ISGID) && + (mp->m_flags & XFS_MOUNT_GRPID)) { + inode->i_uid =current_fsuid ();
Looking a bit harder, I replaced the above line with
inode->i_uid = fsuid_into_mnt(mnt_userns);
Quoted 9 lines
+
inode->i_gid=dir->i_gid;
+inode->i_mode= mode;
} else {fs/xfs/xfs_inode.c +1
-1-inode_init_owner (inode, dir, mode); - inode->i_gid =fsgid_into_mnt (mnt_userns); ++inode_init_owner (mnt_userns, inode, dir, mode); }/*
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 42 lines · Stephen Rothwell
Hi all,
Quoted 27 lines · On Mon, 25 Jan 2021 17:14:14 +1100 Stephen Rothwell <[email protected]>…
Today's linux-next merge of the pidfd tree got a conflict in:
fs/xfs/xfs_inode.cbetween commit:
01ea173e103e("xfs: fix up non-directory creation in SGID directories")from the xfs tree and commit:
f736d93d76d3("xfs: support idmapped mounts")from the pidfd tree.
I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
fs/xfs/xfs_inode.c +0
-0fs/xfs/xfs_inode.c
Quoted 10 lines
fs/xfs/xfs_inode.c +0
-0@@@ -809,13 -810,13 +810,13 @@@ xfs_init_new_inode inode->i_rdev = rdev; ip->i_d.di_projid = prid; - if (pip && XFS_INHERIT_GID(pip)) { - inode->i_gid =VFS_I (pip)->i_gid; - if ((VFS_I(pip)->i_mode & S_ISGID) && S_ISDIR(mode)) - inode->i_mode |=S_ISGID ; + if (dir && !(dir->i_mode & S_ISGID) && + (mp->m_flags & XFS_MOUNT_GRPID)) { + inode->i_uid =current_fsuid ();Looking a bit harder, I replaced the above line with
Quoted 1 line
inode->i_uid = fsuid_into_mnt(mnt_userns);
I think that looks good, though Mr. Brauner is probably better equipped to tell if that change is correct.
(He says watching kernel.org mail take nearly a day to come through...)
--D
Quoted 14 lines
Quoted 10 lines
+
inode->i_gid=dir->i_gid;
+inode->i_mode= mode;
} else {fs/xfs/xfs_inode.c +1
-1-inode_init_owner (inode, dir, mode); - inode->i_gid =fsgid_into_mnt (mnt_userns); ++inode_init_owner (mnt_userns, inode, dir, mode); }/* Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 45 lines · Darrick J. Wong
Quoted 42 lines · Stephen Rothwell
Hi all,
Quoted 27 lines · On Mon, 25 Jan 2021 17:14:14 +1100 Stephen Rothwell <[email protected]>…
Today's linux-next merge of the pidfd tree got a conflict in:
fs/xfs/xfs_inode.cbetween commit:
01ea173e103e("xfs: fix up non-directory creation in SGID directories")from the xfs tree and commit:
f736d93d76d3("xfs: support idmapped mounts")from the pidfd tree.
I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
fs/xfs/xfs_inode.c +0
-0fs/xfs/xfs_inode.c
Quoted 10 lines
fs/xfs/xfs_inode.c +0
-0@@@ -809,13 -810,13 +810,13 @@@ xfs_init_new_inode inode->i_rdev = rdev; ip->i_d.di_projid = prid; - if (pip && XFS_INHERIT_GID(pip)) { - inode->i_gid =VFS_I (pip)->i_gid; - if ((VFS_I(pip)->i_mode & S_ISGID) && S_ISDIR(mode)) - inode->i_mode |=S_ISGID ; + if (dir && !(dir->i_mode & S_ISGID) && + (mp->m_flags & XFS_MOUNT_GRPID)) { + inode->i_uid =current_fsuid ();Looking a bit harder, I replaced the above line with
Quoted 1 line
inode->i_uid = fsuid_into_mnt(mnt_userns);
Quoted 2 lines
I think that looks good, though Mr. Brauner is probably better equipped to tell if that change is correct.
This is on top of the setgid fixup. Yes, this looks good! :)
I think what I'll do is to simply build -next for every release up until the merge window and run the xfstests I added on the kernel. That should reveal regressions very quickly.
Quoted 2 lines
(He says watching kernel.org mail take nearly a day to come through...)
Yeah, it had crazy delays (> 1 day). I chased down a few missing mails from yesterday. Jon took that opportunity to make vger behave a little better I believe, so delivery should be faster today, hopefully.
Christian
Hi all,
Quoted 41 lines · On Wed, 27 Jan 2021 11:24:41 +1100 Stephen Rothwell <[email protected]>…
Quoted 27 lines · On Mon, 25 Jan 2021 17:14:14 +1100 Stephen Rothwell <[email protected]>…
Today's linux-next merge of the pidfd tree got a conflict in:
fs/xfs/xfs_inode.cbetween commit:
01ea173e103e("xfs: fix up non-directory creation in SGID directories")from the xfs tree and commit:
f736d93d76d3("xfs: support idmapped mounts")from the pidfd tree.
I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
fs/xfs/xfs_inode.c +0
-0fs/xfs/xfs_inode.c
Quoted 10 lines
fs/xfs/xfs_inode.c +0
-0@@@ -809,13 -810,13 +810,13 @@@ xfs_init_new_inode inode->i_rdev = rdev; ip->i_d.di_projid = prid; - if (pip && XFS_INHERIT_GID(pip)) { - inode->i_gid =VFS_I (pip)->i_gid; - if ((VFS_I(pip)->i_mode & S_ISGID) && S_ISDIR(mode)) - inode->i_mode |=S_ISGID ; + if (dir && !(dir->i_mode & S_ISGID) && + (mp->m_flags & XFS_MOUNT_GRPID)) { + inode->i_uid =current_fsuid ();Looking a bit harder, I replaced the above line with
Quoted 11 lines
inode->i_uid = fsuid_into_mnt(mnt_userns);Quoted 9 lines
+
inode->i_gid=dir->i_gid;
+inode->i_mode= mode;
} else {fs/xfs/xfs_inode.c +1
-1-inode_init_owner (inode, dir, mode); - inode->i_gid =fsgid_into_mnt (mnt_userns); ++inode_init_owner (mnt_userns, inode, dir, mode); }/*
With the merge window about to open, this is a reminder that this conflict still exists.
Signature · 2 lines
Cheers, Stephen Rothwell
Hi all,
Quoted 53 lines · On Mon, 15 Feb 2021 08:42:43 +1100 Stephen Rothwell <[email protected]>…
Quoted 51 lines · On Wed, 27 Jan 2021 11:24:41 +1100 Stephen Rothwell <[email protected]>…
Quoted 27 lines · On Mon, 25 Jan 2021 17:14:14 +1100 Stephen Rothwell <[email protected]>…
Today's linux-next merge of the pidfd tree got a conflict in:
fs/xfs/xfs_inode.cbetween commit:
01ea173e103e("xfs: fix up non-directory creation in SGID directories")from the xfs tree and commit:
f736d93d76d3("xfs: support idmapped mounts")from the pidfd tree.
I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
fs/xfs/xfs_inode.c +0
-0fs/xfs/xfs_inode.c
Quoted 10 lines
fs/xfs/xfs_inode.c +0
-0@@@ -809,13 -810,13 +810,13 @@@ xfs_init_new_inode inode->i_rdev = rdev; ip->i_d.di_projid = prid; - if (pip && XFS_INHERIT_GID(pip)) { - inode->i_gid =VFS_I (pip)->i_gid; - if ((VFS_I(pip)->i_mode & S_ISGID) && S_ISDIR(mode)) - inode->i_mode |=S_ISGID ; + if (dir && !(dir->i_mode & S_ISGID) && + (mp->m_flags & XFS_MOUNT_GRPID)) { + inode->i_uid =current_fsuid ();Looking a bit harder, I replaced the above line with
inode->i_uid = fsuid_into_mnt(mnt_userns);Quoted 8 lines
+
inode->i_gid=dir->i_gid;
+inode->i_mode= mode;
} else {fs/xfs/xfs_inode.c +1
-1-inode_init_owner (inode, dir, mode); - inode->i_gid =fsgid_into_mnt (mnt_userns); ++inode_init_owner (mnt_userns, inode, dir, mode); }
Quoted 4 lines
Quoted 1 line
Quoted 1 line
/*
With the merge window about to open, this is a reminder that this conflict still exists.
This is now a conflict between the pidfd tree and Linus' tree.
Signature · 2 lines
Cheers, Stephen Rothwell