linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the overlayfs tree
@ 2021-08-18 23:39 Stephen Rothwell
  2021-09-02 23:03 ` Stephen Rothwell
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2021-08-18 23:39 UTC (permalink / raw)
  To: Miklos Szeredi
  Cc: Konstantin Komarov, Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

After merging the overlayfs tree, today's linux-next build (x86_64
allmodconfig) failed like this:

fs/ntfs3/file.c:1231:13: error: initialization of 'struct posix_acl * (*)(struct inode *, int,  bool)' {aka 'struct posix_acl * (*)(struct inode *, int,  _Bool)'} from incompatible pointer type 'struct posix_acl * (*)(struct inode *, int)' [-Werror=incompatible-pointer-types]
 1231 |  .get_acl = ntfs_get_acl,
      |             ^~~~~~~~~~~~
fs/ntfs3/file.c:1231:13: note: (near initialization for 'ntfs_file_inode_operations.get_acl')

Caused by commit

  0cad6246621b ("vfs: add rcu argument to ->get_acl() callback")

interacting with commits

  4534a70b7056 ("fs/ntfs3: Add headers and misc files")
  82cae269cfa9 ("fs/ntfs3: Add initialization of super block")
  4342306f0f0d ("fs/ntfs3: Add file operations and implementation")

from the ntfs3 tree.

I have added the following merge resolution patch.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 19 Aug 2021 09:31:21 +1000
Subject: [PATCH] ntfs3: fix up for "vfs: add rcu argument to ->get_acl() callback"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 fs/ntfs3/ntfs_fs.h | 2 +-
 fs/ntfs3/xattr.c   | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/fs/ntfs3/ntfs_fs.h b/fs/ntfs3/ntfs_fs.h
index 0c3ac89c3115..a0655b8b7be1 100644
--- a/fs/ntfs3/ntfs_fs.h
+++ b/fs/ntfs3/ntfs_fs.h
@@ -787,7 +787,7 @@ int ntfs_cmp_names_cpu(const struct cpu_str *uni1, const struct le_str *uni2,
 
 /* globals from xattr.c */
 #ifdef CONFIG_NTFS3_FS_POSIX_ACL
-struct posix_acl *ntfs_get_acl(struct inode *inode, int type);
+struct posix_acl *ntfs_get_acl(struct inode *inode, int type, bool rcu);
 int ntfs_set_acl(struct user_namespace *mnt_userns, struct inode *inode,
 		 struct posix_acl *acl, int type);
 int ntfs_init_acl(struct user_namespace *mnt_userns, struct inode *inode,
diff --git a/fs/ntfs3/xattr.c b/fs/ntfs3/xattr.c
index 98871c895e77..9239c388050e 100644
--- a/fs/ntfs3/xattr.c
+++ b/fs/ntfs3/xattr.c
@@ -539,8 +539,11 @@ static struct posix_acl *ntfs_get_acl_ex(struct user_namespace *mnt_userns,
  *
  * inode_operations::get_acl
  */
-struct posix_acl *ntfs_get_acl(struct inode *inode, int type)
+struct posix_acl *ntfs_get_acl(struct inode *inode, int type, bool rcu)
 {
+	if (rcu)
+		return ERR_PTR(-ECHILD);
+
 	/* TODO: init_user_ns? */
 	return ntfs_get_acl_ex(&init_user_ns, inode, type, 0);
 }
@@ -640,7 +643,7 @@ static int ntfs_xattr_get_acl(struct user_namespace *mnt_userns,
 	if (!(inode->i_sb->s_flags & SB_POSIXACL))
 		return -EOPNOTSUPP;
 
-	acl = ntfs_get_acl(inode, type);
+	acl = ntfs_get_acl(inode, type, false);
 	if (IS_ERR(acl))
 		return PTR_ERR(acl);
 
-- 
2.32.0

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the overlayfs tree
  2021-08-18 23:39 linux-next: build failure after merge of the overlayfs tree Stephen Rothwell
@ 2021-09-02 23:03 ` Stephen Rothwell
  2021-09-02 23:17   ` Linus Torvalds
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2021-09-02 23:03 UTC (permalink / raw)
  To: Konstantin Komarov
  Cc: Miklos Szeredi, Linux Kernel Mailing List,
	Linux Next Mailing List, Linus Torvalds

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

Hi all,

On Thu, 19 Aug 2021 09:39:10 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the overlayfs tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> fs/ntfs3/file.c:1231:13: error: initialization of 'struct posix_acl * (*)(struct inode *, int,  bool)' {aka 'struct posix_acl * (*)(struct inode *, int,  _Bool)'} from incompatible pointer type 'struct posix_acl * (*)(struct inode *, int)' [-Werror=incompatible-pointer-types]
>  1231 |  .get_acl = ntfs_get_acl,
>       |             ^~~~~~~~~~~~
> fs/ntfs3/file.c:1231:13: note: (near initialization for 'ntfs_file_inode_operations.get_acl')
> 
> Caused by commit
> 
>   0cad6246621b ("vfs: add rcu argument to ->get_acl() callback")
> 
> interacting with commits
> 
>   4534a70b7056 ("fs/ntfs3: Add headers and misc files")
>   82cae269cfa9 ("fs/ntfs3: Add initialization of super block")
>   4342306f0f0d ("fs/ntfs3: Add file operations and implementation")
> 
> from the ntfs3 tree.
> 
> I have added the following merge resolution patch.
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Thu, 19 Aug 2021 09:31:21 +1000
> Subject: [PATCH] ntfs3: fix up for "vfs: add rcu argument to ->get_acl() callback"
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  fs/ntfs3/ntfs_fs.h | 2 +-
>  fs/ntfs3/xattr.c   | 7 +++++--
>  2 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/ntfs3/ntfs_fs.h b/fs/ntfs3/ntfs_fs.h
> index 0c3ac89c3115..a0655b8b7be1 100644
> --- a/fs/ntfs3/ntfs_fs.h
> +++ b/fs/ntfs3/ntfs_fs.h
> @@ -787,7 +787,7 @@ int ntfs_cmp_names_cpu(const struct cpu_str *uni1, const struct le_str *uni2,
>  
>  /* globals from xattr.c */
>  #ifdef CONFIG_NTFS3_FS_POSIX_ACL
> -struct posix_acl *ntfs_get_acl(struct inode *inode, int type);
> +struct posix_acl *ntfs_get_acl(struct inode *inode, int type, bool rcu);
>  int ntfs_set_acl(struct user_namespace *mnt_userns, struct inode *inode,
>  		 struct posix_acl *acl, int type);
>  int ntfs_init_acl(struct user_namespace *mnt_userns, struct inode *inode,
> diff --git a/fs/ntfs3/xattr.c b/fs/ntfs3/xattr.c
> index 98871c895e77..9239c388050e 100644
> --- a/fs/ntfs3/xattr.c
> +++ b/fs/ntfs3/xattr.c
> @@ -539,8 +539,11 @@ static struct posix_acl *ntfs_get_acl_ex(struct user_namespace *mnt_userns,
>   *
>   * inode_operations::get_acl
>   */
> -struct posix_acl *ntfs_get_acl(struct inode *inode, int type)
> +struct posix_acl *ntfs_get_acl(struct inode *inode, int type, bool rcu)
>  {
> +	if (rcu)
> +		return ERR_PTR(-ECHILD);
> +
>  	/* TODO: init_user_ns? */
>  	return ntfs_get_acl_ex(&init_user_ns, inode, type, 0);
>  }
> @@ -640,7 +643,7 @@ static int ntfs_xattr_get_acl(struct user_namespace *mnt_userns,
>  	if (!(inode->i_sb->s_flags & SB_POSIXACL))
>  		return -EOPNOTSUPP;
>  
> -	acl = ntfs_get_acl(inode, type);
> +	acl = ntfs_get_acl(inode, type, false);
>  	if (IS_ERR(acl))
>  		return PTR_ERR(acl);
>  

This merge fix patch is now needed when the ntfs3 tree is merged with
Linus' tree.
-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the overlayfs tree
  2021-09-02 23:03 ` Stephen Rothwell
@ 2021-09-02 23:17   ` Linus Torvalds
  0 siblings, 0 replies; 5+ messages in thread
From: Linus Torvalds @ 2021-09-02 23:17 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Konstantin Komarov, Miklos Szeredi, Linux Kernel Mailing List,
	Linux Next Mailing List

On Thu, Sep 2, 2021 at 4:03 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> This merge fix patch is now needed when the ntfs3 tree is merged with
> Linus' tree.

.. but again, DO NOT APPLY THAT MERGE FIX, because before it is merged
into my tree, it would be wrong and wouldn't even compile.

So just point out this semantic conflict in the pull request.

I'll see it myself when I do the test build, and I'd fix it up even
without that, but this is one of those "make sure everybody is on the
same page" things so that it doesn't fall through the cracks and
everybody knows what to expect.

            Linus

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

* Re: linux-next: build failure after merge of the overlayfs tree
  2020-06-03  1:51 Stephen Rothwell
@ 2020-06-03  7:57 ` Miklos Szeredi
  0 siblings, 0 replies; 5+ messages in thread
From: Miklos Szeredi @ 2020-06-03  7:57 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, James Morris,
	Serge E. Hallyn, LSM

On Wed, Jun 3, 2020 at 3:51 AM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
>
> After merging the overlayfs tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
>
> ERROR: modpost: "security_file_ioctl" [fs/overlayfs/overlay.ko] undefined!
>
> Caused by commit
>
>   b5940870e166 ("ovl: call secutiry hook in ovl_real_ioctl()")
>
> I have applied this patch for today.
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Wed, 3 Jun 2020 11:44:19 +1000
> Subject: [PATCH] export security_file_ioctl
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>


Thanks, folded.

Miklos

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

* linux-next: build failure after merge of the overlayfs tree
@ 2020-06-03  1:51 Stephen Rothwell
  2020-06-03  7:57 ` Miklos Szeredi
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2020-06-03  1:51 UTC (permalink / raw)
  To: Miklos Szeredi
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, James Morris,
	Serge E. Hallyn, linux-security-module

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

Hi all,

After merging the overlayfs tree, today's linux-next build (x86_64
allmodconfig) failed like this:

ERROR: modpost: "security_file_ioctl" [fs/overlayfs/overlay.ko] undefined!

Caused by commit

  b5940870e166 ("ovl: call secutiry hook in ovl_real_ioctl()")

I have applied this patch for today.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 3 Jun 2020 11:44:19 +1000
Subject: [PATCH] export security_file_ioctl

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

diff --git a/security/security.c b/security/security.c
index 51de970fbb1e..077ac86faacf 100644
--- a/security/security.c
+++ b/security/security.c
@@ -1459,6 +1459,7 @@ int security_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 {
 	return call_int_hook(file_ioctl, 0, file, cmd, arg);
 }
+EXPORT_SYMBOL_GPL(security_file_ioctl);
 
 static inline unsigned long mmap_prot(struct file *file, unsigned long prot)
 {
-- 
2.26.2

-- 
Cheers,
Stephen Rothwell

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

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

end of thread, other threads:[~2021-09-02 23:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-18 23:39 linux-next: build failure after merge of the overlayfs tree Stephen Rothwell
2021-09-02 23:03 ` Stephen Rothwell
2021-09-02 23:17   ` Linus Torvalds
  -- strict thread matches above, loose matches on Subject: below --
2020-06-03  1:51 Stephen Rothwell
2020-06-03  7:57 ` Miklos Szeredi

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).