lkml.org 
[lkml]   [2021]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: linux-next: manual merge of the pidfd tree with the overlayfs tree
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
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2021-02-04 23:44    [W:0.064 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site