linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the pidfd tree with the vfs tree
@ 2021-01-25  5:17 Stephen Rothwell
  2021-02-14 20:55 ` Stephen Rothwell
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2021-01-25  5:17 UTC (permalink / raw)
  To: Christian Brauner, Al Viro
  Cc: Christian Brauner, Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

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

  fs/coredump.c

between commit:

  8a3cc755b138 ("coredump: don't bother with do_truncate()")

from the vfs tree and commit:

  643fe55a0679 ("open: handle idmapped mounts in do_truncate()")

from the pidfd tree.

I fixed it up (the former removes dump_truncate(), so I did that) 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

[-- 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 vfs tree
  2021-01-25  5:17 linux-next: manual merge of the pidfd tree with the vfs tree Stephen Rothwell
@ 2021-02-14 20:55 ` Stephen Rothwell
  2021-02-24 22:38   ` Stephen Rothwell
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2021-02-14 20:55 UTC (permalink / raw)
  To: Christian Brauner, Al Viro
  Cc: Christian Brauner, Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

On Mon, 25 Jan 2021 16:17:06 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> Today's linux-next merge of the pidfd tree got a conflict in:
> 
>   fs/coredump.c
> 
> between commit:
> 
>   8a3cc755b138 ("coredump: don't bother with do_truncate()")
> 
> from the vfs tree and commit:
> 
>   643fe55a0679 ("open: handle idmapped mounts in do_truncate()")
> 
> from the pidfd tree.
> 
> I fixed it up (the former removes dump_truncate(), so I did that) 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.

With the merge window about to open, this is a reminder that this
conflict still exists.

-- 
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 vfs tree
  2021-02-14 20:55 ` Stephen Rothwell
@ 2021-02-24 22:38   ` Stephen Rothwell
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2021-02-24 22:38 UTC (permalink / raw)
  To: Al Viro
  Cc: Christian Brauner, Christian Brauner, Linux Kernel Mailing List,
	Linux Next Mailing List

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

Hi all,

On Mon, 15 Feb 2021 07:55:14 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> On Mon, 25 Jan 2021 16:17:06 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > 
> > Today's linux-next merge of the pidfd tree got a conflict in:
> > 
> >   fs/coredump.c
> > 
> > between commit:
> > 
> >   8a3cc755b138 ("coredump: don't bother with do_truncate()")

Now:

  0016c9bb87a7 ("coredump: don't bother with do_truncate()")

> > 
> > from the vfs tree and commit:
> > 
> >   643fe55a0679 ("open: handle idmapped mounts in do_truncate()")
> > 
> > from the pidfd tree.
> > 
> > I fixed it up (the former removes dump_truncate(), so I did that) 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.  
> 
> With the merge window about to open, this is a reminder that this
> conflict still exists.

This is now a conflict between the vfs 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 vfs tree
  2021-02-14 21:05 ` Stephen Rothwell
@ 2021-02-21 22:51   ` Stephen Rothwell
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2021-02-21 22:51 UTC (permalink / raw)
  To: Christian Brauner
  Cc: Al Viro, Christian Brauner, Jens Axboe,
	Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

On Mon, 15 Feb 2021 08:05:21 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> On Mon, 25 Jan 2021 17:00:54 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > Today's linux-next merge of the pidfd tree got a conflict in:
> > 
> >   fs/namei.c
> > 
> > between commit:
> > 
> >   e36cffed20a3 ("fs: make unlazy_walk() error handling consistent")
> >   1e8f44f159b3 ("do_tmpfile(): don't mess with finish_open()")
> > 
> > from the vfs tree and commit:
> > 
> >   47291baa8ddf ("namei: make permission helpers idmapped mount aware")
> >   ba73d98745be ("namei: handle idmapped mounts in may_*() helpers")
> >   549c7297717c ("fs: make helpers idmap mount aware")
> > 
> > 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/namei.c
> > index 4cae88733a5c,dbf53b325ac9..000000000000
> > --- a/fs/namei.c
> > +++ b/fs/namei.c
> > @@@ -1568,14 -1639,18 +1644,16 @@@ static struct dentry *lookup_slow(cons
> >   	return res;
> >   }
> >   
> > - static inline int may_lookup(struct nameidata *nd)
> > + static inline int may_lookup(struct user_namespace *mnt_userns,
> > + 			     struct nameidata *nd)
> >   {
> >   	if (nd->flags & LOOKUP_RCU) {
> > - 		int err = inode_permission(nd->inode, MAY_EXEC|MAY_NOT_BLOCK);
> > + 		int err = inode_permission(mnt_userns, nd->inode,
> > + 					   MAY_EXEC | MAY_NOT_BLOCK);
> >  -		if (err != -ECHILD)
> >  +		if (err != -ECHILD || !try_to_unlazy(nd))
> >   			return err;
> >  -		if (unlazy_walk(nd))
> >  -			return -ECHILD;
> >   	}
> > - 	return inode_permission(nd->inode, MAY_EXEC);
> > + 	return inode_permission(mnt_userns, nd->inode, MAY_EXEC);
> >   }
> >   
> >   static int reserve_stack(struct nameidata *nd, struct path *link, unsigned seq)
> > @@@ -3324,9 -3453,11 +3453,9 @@@ static int do_tmpfile(struct nameidata 
> >   	path.dentry = child;
> >   	audit_inode(nd->name, child, 0);
> >   	/* Don't check for other permissions, the inode was just created */
> > - 	error = may_open(&path, 0, op->open_flag);
> > + 	error = may_open(mnt_userns, &path, 0, op->open_flag);
> >  -	if (error)
> >  -		goto out2;
> >  -	file->f_path.mnt = path.mnt;
> >  -	error = finish_open(file, child, NULL);
> >  +	if (!error)
> >  +		error = vfs_open(&path, file);
> >   out2:
> >   	mnt_drop_write(path.mnt);
> >   out:  
> 
> With the merge window about to open, this is a reminder that this
> conflict still exists.
> 
> Those vfs tree commits have also been merged into the block tree.

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 vfs tree
  2021-01-25  6:00 Stephen Rothwell
@ 2021-02-14 21:05 ` Stephen Rothwell
  2021-02-21 22:51   ` Stephen Rothwell
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2021-02-14 21:05 UTC (permalink / raw)
  To: Christian Brauner, Al Viro
  Cc: Christian Brauner, Jens Axboe, Linux Kernel Mailing List,
	Linux Next Mailing List, Jens Axboe

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

Hi all,

On Mon, 25 Jan 2021 17:00:54 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the pidfd tree got a conflict in:
> 
>   fs/namei.c
> 
> between commit:
> 
>   e36cffed20a3 ("fs: make unlazy_walk() error handling consistent")
>   1e8f44f159b3 ("do_tmpfile(): don't mess with finish_open()")
> 
> from the vfs tree and commit:
> 
>   47291baa8ddf ("namei: make permission helpers idmapped mount aware")
>   ba73d98745be ("namei: handle idmapped mounts in may_*() helpers")
>   549c7297717c ("fs: make helpers idmap mount aware")
> 
> 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/namei.c
> index 4cae88733a5c,dbf53b325ac9..000000000000
> --- a/fs/namei.c
> +++ b/fs/namei.c
> @@@ -1568,14 -1639,18 +1644,16 @@@ static struct dentry *lookup_slow(cons
>   	return res;
>   }
>   
> - static inline int may_lookup(struct nameidata *nd)
> + static inline int may_lookup(struct user_namespace *mnt_userns,
> + 			     struct nameidata *nd)
>   {
>   	if (nd->flags & LOOKUP_RCU) {
> - 		int err = inode_permission(nd->inode, MAY_EXEC|MAY_NOT_BLOCK);
> + 		int err = inode_permission(mnt_userns, nd->inode,
> + 					   MAY_EXEC | MAY_NOT_BLOCK);
>  -		if (err != -ECHILD)
>  +		if (err != -ECHILD || !try_to_unlazy(nd))
>   			return err;
>  -		if (unlazy_walk(nd))
>  -			return -ECHILD;
>   	}
> - 	return inode_permission(nd->inode, MAY_EXEC);
> + 	return inode_permission(mnt_userns, nd->inode, MAY_EXEC);
>   }
>   
>   static int reserve_stack(struct nameidata *nd, struct path *link, unsigned seq)
> @@@ -3324,9 -3453,11 +3453,9 @@@ static int do_tmpfile(struct nameidata 
>   	path.dentry = child;
>   	audit_inode(nd->name, child, 0);
>   	/* Don't check for other permissions, the inode was just created */
> - 	error = may_open(&path, 0, op->open_flag);
> + 	error = may_open(mnt_userns, &path, 0, op->open_flag);
>  -	if (error)
>  -		goto out2;
>  -	file->f_path.mnt = path.mnt;
>  -	error = finish_open(file, child, NULL);
>  +	if (!error)
>  +		error = vfs_open(&path, file);
>   out2:
>   	mnt_drop_write(path.mnt);
>   out:

With the merge window about to open, this is a reminder that this
conflict still exists.

Those vfs tree commits have also been merged into the block 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 vfs tree
@ 2021-01-25  6:00 Stephen Rothwell
  2021-02-14 21:05 ` Stephen Rothwell
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2021-01-25  6:00 UTC (permalink / raw)
  To: Christian Brauner, Al Viro
  Cc: Christian Brauner, Jens Axboe, Linux Kernel Mailing List,
	Linux Next Mailing List

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

Hi all,

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

  fs/namei.c

between commit:

  e36cffed20a3 ("fs: make unlazy_walk() error handling consistent")
  1e8f44f159b3 ("do_tmpfile(): don't mess with finish_open()")

from the vfs tree and commit:

  47291baa8ddf ("namei: make permission helpers idmapped mount aware")
  ba73d98745be ("namei: handle idmapped mounts in may_*() helpers")
  549c7297717c ("fs: make helpers idmap mount aware")

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/namei.c
index 4cae88733a5c,dbf53b325ac9..000000000000
--- a/fs/namei.c
+++ b/fs/namei.c
@@@ -1568,14 -1639,18 +1644,16 @@@ static struct dentry *lookup_slow(cons
  	return res;
  }
  
- static inline int may_lookup(struct nameidata *nd)
+ static inline int may_lookup(struct user_namespace *mnt_userns,
+ 			     struct nameidata *nd)
  {
  	if (nd->flags & LOOKUP_RCU) {
- 		int err = inode_permission(nd->inode, MAY_EXEC|MAY_NOT_BLOCK);
+ 		int err = inode_permission(mnt_userns, nd->inode,
+ 					   MAY_EXEC | MAY_NOT_BLOCK);
 -		if (err != -ECHILD)
 +		if (err != -ECHILD || !try_to_unlazy(nd))
  			return err;
 -		if (unlazy_walk(nd))
 -			return -ECHILD;
  	}
- 	return inode_permission(nd->inode, MAY_EXEC);
+ 	return inode_permission(mnt_userns, nd->inode, MAY_EXEC);
  }
  
  static int reserve_stack(struct nameidata *nd, struct path *link, unsigned seq)
@@@ -3324,9 -3453,11 +3453,9 @@@ static int do_tmpfile(struct nameidata 
  	path.dentry = child;
  	audit_inode(nd->name, child, 0);
  	/* Don't check for other permissions, the inode was just created */
- 	error = may_open(&path, 0, op->open_flag);
+ 	error = may_open(mnt_userns, &path, 0, op->open_flag);
 -	if (error)
 -		goto out2;
 -	file->f_path.mnt = path.mnt;
 -	error = finish_open(file, child, NULL);
 +	if (!error)
 +		error = vfs_open(&path, file);
  out2:
  	mnt_drop_write(path.mnt);
  out:

[-- 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-24 22:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-25  5:17 linux-next: manual merge of the pidfd tree with the vfs tree Stephen Rothwell
2021-02-14 20:55 ` Stephen Rothwell
2021-02-24 22:38   ` Stephen Rothwell
2021-01-25  6:00 Stephen Rothwell
2021-02-14 21:05 ` Stephen Rothwell
2021-02-21 22:51   ` 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).