linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the pidfd tree with the overlayfs tree
@ 2021-01-25  6:07 Stephen Rothwell
  2021-02-04 22:40 ` Stephen Rothwell
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2021-01-25  6:07 UTC (permalink / raw)
  To: Christian Brauner, Miklos Szeredi
  Cc: Christian Brauner, Linux Kernel Mailing List,
	Linux Next Mailing List, Miklos Szeredi, Tycho Andersen

[-- Attachment #1: Type: text/plain, Size: 1223 bytes --]

Hi all,

Today's linux-next merge of the pidfd tree got a conflict in:

  fs/overlayfs/inode.c

between commit:

  9c09be9e71c4 ("ovl: perform vfs_getxattr() with mounter creds")

from the overlayfs tree and commit:

  c7c7a1a18af4 ("xattr: handle 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.

-- 
Cheers,
Stephen Rothwell

diff --cc fs/overlayfs/inode.c
index cf41bcb664bc,e78d45dfeaee..000000000000
--- a/fs/overlayfs/inode.c
+++ b/fs/overlayfs/inode.c
@@@ -352,9 -354,7 +354,9 @@@ int ovl_xattr_set(struct dentry *dentry
  		goto out;
  
  	if (!value && !upperdentry) {
 +		old_cred = ovl_override_creds(dentry->d_sb);
- 		err = vfs_getxattr(realdentry, name, NULL, 0);
+ 		err = vfs_getxattr(&init_user_ns, realdentry, name, NULL, 0);
 +		revert_creds(old_cred);
  		if (err < 0)
  			goto out_drop_write;
  	}

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: manual merge of the pidfd tree with the overlayfs tree
  2021-01-25  6:07 linux-next: manual merge of the pidfd tree with the overlayfs tree Stephen Rothwell
@ 2021-02-04 22:40 ` Stephen Rothwell
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2021-02-04 22:40 UTC (permalink / raw)
  To: Christian Brauner
  Cc: Miklos Szeredi, Christian Brauner, Linux Kernel Mailing List,
	Linux Next Mailing List, Miklos Szeredi, Tycho Andersen

[-- Attachment #1: Type: text/plain, Size: 1451 bytes --]

Hi all,

On Mon, 25 Jan 2021 17:07:16 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the pidfd tree got a conflict in:
> 
>   fs/overlayfs/inode.c
> 
> between commit:
> 
>   9c09be9e71c4 ("ovl: perform vfs_getxattr() with mounter creds")
> 
> from the overlayfs tree and commit:
> 
>   c7c7a1a18af4 ("xattr: handle 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.
> 
> 
> diff --cc fs/overlayfs/inode.c
> index cf41bcb664bc,e78d45dfeaee..000000000000
> --- a/fs/overlayfs/inode.c
> +++ b/fs/overlayfs/inode.c
> @@@ -352,9 -354,7 +354,9 @@@ int ovl_xattr_set(struct dentry *dentry
>   		goto out;
>   
>   	if (!value && !upperdentry) {
>  +		old_cred = ovl_override_creds(dentry->d_sb);
> - 		err = vfs_getxattr(realdentry, name, NULL, 0);
> + 		err = vfs_getxattr(&init_user_ns, realdentry, name, NULL, 0);
>  +		revert_creds(old_cred);
>   		if (err < 0)
>   			goto out_drop_write;
>   	}

This is now a conflict between the pidfd tree and Linus' tree.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: manual merge of the pidfd tree with the overlayfs tree
  2021-01-25  6:04 Stephen Rothwell
@ 2021-02-04 22:42 ` Stephen Rothwell
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2021-02-04 22:42 UTC (permalink / raw)
  To: Christian Brauner
  Cc: Miklos Szeredi, Amir Goldstein, Christian Brauner,
	Linux Kernel Mailing List, Linux Next Mailing List,
	Miklos Szeredi, Tycho Andersen

[-- Attachment #1: Type: text/plain, Size: 2220 bytes --]

Hi all,

On Mon, 25 Jan 2021 17:04:26 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the pidfd tree got a conflict in:
> 
>   fs/overlayfs/copy_up.c
> 
> between commit:
> 
>   06896fa3193d ("ovl: skip getxattr of security labels")
> 
> from the overlayfs tree and commit:
> 
>   c7c7a1a18af4 ("xattr: handle 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.
> 
> diff --cc fs/overlayfs/copy_up.c
> index 0fed532efa68,f81b836c2256..000000000000
> --- a/fs/overlayfs/copy_up.c
> +++ b/fs/overlayfs/copy_up.c
> @@@ -84,18 -84,10 +84,18 @@@ int ovl_copy_xattr(struct super_block *
>   
>   		if (ovl_is_private_xattr(sb, name))
>   			continue;
>  +
>  +		error = security_inode_copy_up_xattr(name);
>  +		if (error < 0 && error != -EOPNOTSUPP)
>  +			break;
>  +		if (error == 1) {
>  +			error = 0;
>  +			continue; /* Discard */
>  +		}
>   retry:
> - 		size = vfs_getxattr(old, name, value, value_size);
> + 		size = vfs_getxattr(&init_user_ns, old, name, value, value_size);
>   		if (size == -ERANGE)
> - 			size = vfs_getxattr(old, name, NULL, 0);
> + 			size = vfs_getxattr(&init_user_ns, old, name, NULL, 0);
>   
>   		if (size < 0) {
>   			error = size;
> @@@ -115,7 -107,14 +115,7 @@@
>   			goto retry;
>   		}
>   
> - 		error = vfs_setxattr(new, name, value, size, 0);
>  -		error = security_inode_copy_up_xattr(name);
>  -		if (error < 0 && error != -EOPNOTSUPP)
>  -			break;
>  -		if (error == 1) {
>  -			error = 0;
>  -			continue; /* Discard */
>  -		}
> + 		error = vfs_setxattr(&init_user_ns, new, name, value, size, 0);
>   		if (error) {
>   			if (error != -EOPNOTSUPP || ovl_must_copy_xattr(name))
>   				break;

This is now a conflict between the pidfd tree and Linus' tree.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: manual merge of the pidfd tree with the overlayfs tree
  2021-01-25  5:23 Stephen Rothwell
@ 2021-01-31 23:19 ` Stephen Rothwell
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2021-01-31 23:19 UTC (permalink / raw)
  To: Christian Brauner
  Cc: Miklos Szeredi, Christian Brauner, Linux Kernel Mailing List,
	Linux Next Mailing List, Miklos Szeredi, Tycho Andersen,
	Tyler Hicks

[-- Attachment #1: Type: text/plain, Size: 1709 bytes --]

Hi all,

On Mon, 25 Jan 2021 16:23:36 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the pidfd tree got a conflict in:
> 
>   fs/ecryptfs/inode.c
> 
> between commit:
> 
>   176cfe865da6 ("ecryptfs: fix uid translation for setxattr on security.capability")
> 
> from the overlayfs tree and commit:
> 
>   c7c7a1a18af4 ("xattr: handle 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.
> 
> 
> diff --cc fs/ecryptfs/inode.c
> index 58d0f7187997,55da9a91f51a..000000000000
> --- a/fs/ecryptfs/inode.c
> +++ b/fs/ecryptfs/inode.c
> @@@ -1024,11 -1043,10 +1045,12 @@@ ecryptfs_setxattr(struct dentry *dentry
>   		rc = -EOPNOTSUPP;
>   		goto out;
>   	}
>  -	rc = vfs_setxattr(&init_user_ns, lower_dentry, name, value, size,
>  -			  flags);
>  +	inode_lock(lower_inode);
> - 	rc = __vfs_setxattr_locked(lower_dentry, name, value, size, flags, NULL);
> ++	rc = __vfs_setxattr_locked(&init_user_ns, lower_dentry, name,
> ++				   value, size, flags, NULL);
>  +	inode_unlock(lower_inode);
>   	if (!rc && inode)
>  -		fsstack_copy_attr_all(inode, d_inode(lower_dentry));
>  +		fsstack_copy_attr_all(inode, lower_inode);
>   out:
>   	return rc;
>   }

This is now a conflict between the pidfd tree and Linus' tree.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* linux-next: manual merge of the pidfd tree with the overlayfs tree
@ 2021-01-25  6:04 Stephen Rothwell
  2021-02-04 22:42 ` Stephen Rothwell
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2021-01-25  6:04 UTC (permalink / raw)
  To: Christian Brauner, Miklos Szeredi
  Cc: Amir Goldstein, Christian Brauner, Linux Kernel Mailing List,
	Linux Next Mailing List, Miklos Szeredi, Tycho Andersen

[-- Attachment #1: Type: text/plain, Size: 1944 bytes --]

Hi all,

Today's linux-next merge of the pidfd tree got a conflict in:

  fs/overlayfs/copy_up.c

between commit:

  06896fa3193d ("ovl: skip getxattr of security labels")

from the overlayfs tree and commit:

  c7c7a1a18af4 ("xattr: handle 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.

-- 
Cheers,
Stephen Rothwell

diff --cc fs/overlayfs/copy_up.c
index 0fed532efa68,f81b836c2256..000000000000
--- a/fs/overlayfs/copy_up.c
+++ b/fs/overlayfs/copy_up.c
@@@ -84,18 -84,10 +84,18 @@@ int ovl_copy_xattr(struct super_block *
  
  		if (ovl_is_private_xattr(sb, name))
  			continue;
 +
 +		error = security_inode_copy_up_xattr(name);
 +		if (error < 0 && error != -EOPNOTSUPP)
 +			break;
 +		if (error == 1) {
 +			error = 0;
 +			continue; /* Discard */
 +		}
  retry:
- 		size = vfs_getxattr(old, name, value, value_size);
+ 		size = vfs_getxattr(&init_user_ns, old, name, value, value_size);
  		if (size == -ERANGE)
- 			size = vfs_getxattr(old, name, NULL, 0);
+ 			size = vfs_getxattr(&init_user_ns, old, name, NULL, 0);
  
  		if (size < 0) {
  			error = size;
@@@ -115,7 -107,14 +115,7 @@@
  			goto retry;
  		}
  
- 		error = vfs_setxattr(new, name, value, size, 0);
 -		error = security_inode_copy_up_xattr(name);
 -		if (error < 0 && error != -EOPNOTSUPP)
 -			break;
 -		if (error == 1) {
 -			error = 0;
 -			continue; /* Discard */
 -		}
+ 		error = vfs_setxattr(&init_user_ns, new, name, value, size, 0);
  		if (error) {
  			if (error != -EOPNOTSUPP || ovl_must_copy_xattr(name))
  				break;

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* linux-next: manual merge of the pidfd tree with the overlayfs tree
@ 2021-01-25  5:23 Stephen Rothwell
  2021-01-31 23:19 ` Stephen Rothwell
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2021-01-25  5:23 UTC (permalink / raw)
  To: Christian Brauner, Miklos Szeredi
  Cc: Christian Brauner, Linux Kernel Mailing List,
	Linux Next Mailing List, Miklos Szeredi, Tycho Andersen

[-- Attachment #1: Type: text/plain, Size: 1469 bytes --]

Hi all,

Today's linux-next merge of the pidfd tree got a conflict in:

  fs/ecryptfs/inode.c

between commit:

  176cfe865da6 ("ecryptfs: fix uid translation for setxattr on security.capability")

from the overlayfs tree and commit:

  c7c7a1a18af4 ("xattr: handle 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.

-- 
Cheers,
Stephen Rothwell

diff --cc fs/ecryptfs/inode.c
index 58d0f7187997,55da9a91f51a..000000000000
--- a/fs/ecryptfs/inode.c
+++ b/fs/ecryptfs/inode.c
@@@ -1024,11 -1043,10 +1045,12 @@@ ecryptfs_setxattr(struct dentry *dentry
  		rc = -EOPNOTSUPP;
  		goto out;
  	}
 -	rc = vfs_setxattr(&init_user_ns, lower_dentry, name, value, size,
 -			  flags);
 +	inode_lock(lower_inode);
- 	rc = __vfs_setxattr_locked(lower_dentry, name, value, size, flags, NULL);
++	rc = __vfs_setxattr_locked(&init_user_ns, lower_dentry, name,
++				   value, size, flags, NULL);
 +	inode_unlock(lower_inode);
  	if (!rc && inode)
 -		fsstack_copy_attr_all(inode, d_inode(lower_dentry));
 +		fsstack_copy_attr_all(inode, lower_inode);
  out:
  	return rc;
  }

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-02-04 22:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-25  6:07 linux-next: manual merge of the pidfd tree with the overlayfs tree Stephen Rothwell
2021-02-04 22:40 ` Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2021-01-25  6:04 Stephen Rothwell
2021-02-04 22:42 ` Stephen Rothwell
2021-01-25  5:23 Stephen Rothwell
2021-01-31 23:19 ` Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).