All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-next: manual merge of the fscache tree with the pidfd tree
@ 2021-12-05 22:07 Stephen Rothwell
  0 siblings, 0 replies; 4+ messages in thread
From: Stephen Rothwell @ 2021-12-05 22:07 UTC (permalink / raw)
  To: David Howells, Christian Brauner
  Cc: Christian Brauner, Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

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

  fs/cachefiles/bind.c

between commit:

  bb49e9e730c2 ("fs: add is_idmapped_mnt() helper")

from the pidfd tree and commit:

  d18c9010376b ("cachefiles: Delete the cachefiles driver pending rewrite")

from the fscache tree.

I fixed it up (the latter deleted the file, so I did that and then added
the following patch) 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.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 6 Dec 2021 09:05:07 +1100
Subject: [PATCH] fix up for "fs: add is_idmapped_mnt() helper"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 fs/cachefiles/cache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/cachefiles/cache.c b/fs/cachefiles/cache.c
index 327cea71557f..e0aa8bf429b8 100644
--- a/fs/cachefiles/cache.c
+++ b/fs/cachefiles/cache.c
@@ -44,7 +44,7 @@ int cachefiles_add_cache(struct cachefiles_cache *cache)
 	root = path.dentry;
 
 	ret = -EINVAL;
-	if (mnt_user_ns(path.mnt) != &init_user_ns) {
+	if (is_idmapped_mnt(path.mnt)) {
 		pr_warn("File cache on idmapped mounts not supported");
 		goto error_unsupported;
 	}
-- 
2.33.0

-- 
Cheers,
Stephen Rothwell

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

^ permalink raw reply	[flat|nested] 4+ messages in thread
* linux-next: manual merge of the fscache tree with the pidfd tree
@ 2021-01-26 23:00 Stephen Rothwell
  2021-02-14 21:14 ` Stephen Rothwell
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2021-01-26 23:00 UTC (permalink / raw)
  To: David Howells, Christian Brauner
  Cc: Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

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

  include/linux/fs.h

between commit:

  ba73d98745be ("namei: handle idmapped mounts in may_*() helpers")

from the pidfd tree and commit:

  0de0bdfa19fa ("vfs: Export rw_verify_area() for use by cachefiles")

from the fscache 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 include/linux/fs.h
index 7762d3d75230,493804856ab3..000000000000
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@@ -2839,22 -2756,11 +2839,23 @@@ static inline int bmap(struct inode *in
  }
  #endif
  
 -extern int notify_change(struct dentry *, struct iattr *, struct inode **);
 -extern int inode_permission(struct inode *, int);
 -extern int generic_permission(struct inode *, int);
 -extern int __check_sticky(struct inode *dir, struct inode *inode);
 +int notify_change(struct user_namespace *, struct dentry *,
 +		  struct iattr *, struct inode **);
 +int inode_permission(struct user_namespace *, struct inode *, int);
 +int generic_permission(struct user_namespace *, struct inode *, int);
 +static inline int file_permission(struct file *file, int mask)
 +{
 +	return inode_permission(file_mnt_user_ns(file),
 +				file_inode(file), mask);
 +}
 +static inline int path_permission(const struct path *path, int mask)
 +{
 +	return inode_permission(mnt_user_ns(path->mnt),
 +				d_inode(path->dentry), mask);
 +}
 +int __check_sticky(struct user_namespace *mnt_userns, struct inode *dir,
 +		   struct inode *inode);
+ extern int rw_verify_area(int, struct file *, const loff_t *, size_t);
  
  static inline bool execute_ok(struct inode *inode)
  {

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

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

end of thread, other threads:[~2021-12-05 22:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-05 22:07 linux-next: manual merge of the fscache tree with the pidfd tree Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2021-01-26 23:00 Stephen Rothwell
2021-02-14 21:14 ` Stephen Rothwell
2021-02-24 22:40   ` Stephen Rothwell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.