2020-07-08 04:13:00

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build failure after merge of the security tree

Hi all,

After merging the security tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

fs/anon_inodes.c: In function 'anon_inode_make_secure_inode':
fs/anon_inodes.c:70:10: error: implicit declaration of function 'security_inode_init_security_anon'; did you mean 'security_inode_init_security'? [-Werror=implicit-function-declaration]
70 | error = security_inode_init_security_anon(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| security_inode_init_security

Caused by commit

2749d3f84a70 ("Add a new LSM-supporting anonymous inode interface")

# CONFIG_SECURITY is not set

Also, the explicit include of linux/security.h is missing ...

I have added the following patch for today.

From b2bae25c9b715e06f7e802ec7b51cfbfec046e6c Mon Sep 17 00:00:00 2001
From: Stephen Rothwell <[email protected]>
Date: Wed, 8 Jul 2020 13:43:01 +1000
Subject: [PATCH] fix up for "Add a new LSM-supporting anonymous inode interface"

Signed-off-by: Stephen Rothwell <[email protected]>
---
fs/anon_inodes.c | 1 +
include/linux/security.h | 7 +++++++
2 files changed, 8 insertions(+)

diff --git a/fs/anon_inodes.c b/fs/anon_inodes.c
index f87f221167cf..25d92c64411e 100644
--- a/fs/anon_inodes.c
+++ b/fs/anon_inodes.c
@@ -21,6 +21,7 @@
#include <linux/magic.h>
#include <linux/anon_inodes.h>
#include <linux/pseudo_fs.h>
+#include <linux/security.h>

#include <linux/uaccess.h>

diff --git a/include/linux/security.h b/include/linux/security.h
index 95c133a8f8bb..7c6b3dcf4721 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -735,6 +735,13 @@ static inline int security_inode_init_security(struct inode *inode,
return 0;
}

+static inline int security_inode_init_security_anon(struct inode *inode,
+ const struct qstr *name,
+ const struct inode *context_inode)
+{
+ return 0;
+}
+
static inline int security_old_inode_init_security(struct inode *inode,
struct inode *dir,
const struct qstr *qstr,
--
2.27.0

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2020-07-13 02:05:30

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the security tree

Hi all,

On Wed, 8 Jul 2020 14:00:34 +1000 Stephen Rothwell <[email protected]> wrote:
>
> After merging the security tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
>
> fs/anon_inodes.c: In function 'anon_inode_make_secure_inode':
> fs/anon_inodes.c:70:10: error: implicit declaration of function 'security_inode_init_security_anon'; did you mean 'security_inode_init_security'? [-Werror=implicit-function-declaration]
> 70 | error = security_inode_init_security_anon(
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> | security_inode_init_security
>
> Caused by commit
>
> 2749d3f84a70 ("Add a new LSM-supporting anonymous inode interface")
>
> # CONFIG_SECURITY is not set
>
> Also, the explicit include of linux/security.h is missing ...
>
> I have added the following patch for today.
>
> From b2bae25c9b715e06f7e802ec7b51cfbfec046e6c Mon Sep 17 00:00:00 2001
> From: Stephen Rothwell <[email protected]>
> Date: Wed, 8 Jul 2020 13:43:01 +1000
> Subject: [PATCH] fix up for "Add a new LSM-supporting anonymous inode interface"
>
> Signed-off-by: Stephen Rothwell <[email protected]>
> ---
> fs/anon_inodes.c | 1 +
> include/linux/security.h | 7 +++++++
> 2 files changed, 8 insertions(+)
>
> diff --git a/fs/anon_inodes.c b/fs/anon_inodes.c
> index f87f221167cf..25d92c64411e 100644
> --- a/fs/anon_inodes.c
> +++ b/fs/anon_inodes.c
> @@ -21,6 +21,7 @@
> #include <linux/magic.h>
> #include <linux/anon_inodes.h>
> #include <linux/pseudo_fs.h>
> +#include <linux/security.h>
>
> #include <linux/uaccess.h>
>
> diff --git a/include/linux/security.h b/include/linux/security.h
> index 95c133a8f8bb..7c6b3dcf4721 100644
> --- a/include/linux/security.h
> +++ b/include/linux/security.h
> @@ -735,6 +735,13 @@ static inline int security_inode_init_security(struct inode *inode,
> return 0;
> }
>
> +static inline int security_inode_init_security_anon(struct inode *inode,
> + const struct qstr *name,
> + const struct inode *context_inode)
> +{
> + return 0;
> +}
> +
> static inline int security_old_inode_init_security(struct inode *inode,
> struct inode *dir,
> const struct qstr *qstr,

I am still applying the above patch ...

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2020-07-13 02:07:51

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the security tree

Hi all,

On Mon, 13 Jul 2020 12:04:19 +1000 Stephen Rothwell <[email protected]> wrote:
>
> I am still applying the above patch ...

And the mail address Daniel Colascione <[email protected]> bounces.

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2020-07-29 23:35:51

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the security tree

Hi all,

On Mon, 13 Jul 2020 12:04:19 +1000 Stephen Rothwell <[email protected]> wrote:
>
> On Wed, 8 Jul 2020 14:00:34 +1000 Stephen Rothwell <[email protected]> wrote:
> >
> > After merging the security tree, today's linux-next build (powerpc
> > ppc64_defconfig) failed like this:
> >
> > fs/anon_inodes.c: In function 'anon_inode_make_secure_inode':
> > fs/anon_inodes.c:70:10: error: implicit declaration of function 'security_inode_init_security_anon'; did you mean 'security_inode_init_security'? [-Werror=implicit-function-declaration]
> > 70 | error = security_inode_init_security_anon(
> > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > | security_inode_init_security
> >
> > Caused by commit
> >
> > 2749d3f84a70 ("Add a new LSM-supporting anonymous inode interface")
> >
> > # CONFIG_SECURITY is not set
> >
> > Also, the explicit include of linux/security.h is missing ...
> >
> > I have added the following patch for today.
> >
> > From b2bae25c9b715e06f7e802ec7b51cfbfec046e6c Mon Sep 17 00:00:00 2001
> > From: Stephen Rothwell <[email protected]>
> > Date: Wed, 8 Jul 2020 13:43:01 +1000
> > Subject: [PATCH] fix up for "Add a new LSM-supporting anonymous inode interface"
> >
> > Signed-off-by: Stephen Rothwell <[email protected]>
> > ---
> > fs/anon_inodes.c | 1 +
> > include/linux/security.h | 7 +++++++
> > 2 files changed, 8 insertions(+)
> >
> > diff --git a/fs/anon_inodes.c b/fs/anon_inodes.c
> > index f87f221167cf..25d92c64411e 100644
> > --- a/fs/anon_inodes.c
> > +++ b/fs/anon_inodes.c
> > @@ -21,6 +21,7 @@
> > #include <linux/magic.h>
> > #include <linux/anon_inodes.h>
> > #include <linux/pseudo_fs.h>
> > +#include <linux/security.h>
> >
> > #include <linux/uaccess.h>
> >
> > diff --git a/include/linux/security.h b/include/linux/security.h
> > index 95c133a8f8bb..7c6b3dcf4721 100644
> > --- a/include/linux/security.h
> > +++ b/include/linux/security.h
> > @@ -735,6 +735,13 @@ static inline int security_inode_init_security(struct inode *inode,
> > return 0;
> > }
> >
> > +static inline int security_inode_init_security_anon(struct inode *inode,
> > + const struct qstr *name,
> > + const struct inode *context_inode)
> > +{
> > + return 0;
> > +}
> > +
> > static inline int security_old_inode_init_security(struct inode *inode,
> > struct inode *dir,
> > const struct qstr *qstr,
>
> I am still applying the above patch ...

The merge window is coming up fast ... is anything happening about this
failure?
--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2020-07-30 02:37:55

by James Morris

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the security tree

On Thu, 30 Jul 2020, Stephen Rothwell wrote:

> > I am still applying the above patch ...
>
> The merge window is coming up fast ... is anything happening about this
> failure?

A new patch is coming, but I'm not sure this code has had enough review
from the core VFS folk.

Please drop secure_uffd_v5.9 for the time being.


--
James Morris
<[email protected]>

2020-07-30 03:02:34

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the security tree

Hi James,

On Thu, 30 Jul 2020 12:35:03 +1000 (AEST) James Morris <[email protected]> wrote:
>
> On Thu, 30 Jul 2020, Stephen Rothwell wrote:
>
> > > I am still applying the above patch ...
> >
> > The merge window is coming up fast ... is anything happening about this
> > failure?
>
> A new patch is coming, but I'm not sure this code has had enough review
> from the core VFS folk.
>
> Please drop secure_uffd_v5.9 for the time being.

You just need to remove/revert it from your security tree
(git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git#next-testing).
--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2020-07-30 05:06:14

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the security tree

Hi Stephen,

On Thu, 30 Jul 2020 12:59:04 +1000 Stephen Rothwell <[email protected]> wrote:
>
> Hi James,
>
> On Thu, 30 Jul 2020 12:35:03 +1000 (AEST) James Morris <[email protected]> wrote:
> >
> > On Thu, 30 Jul 2020, Stephen Rothwell wrote:
> >
> > > > I am still applying the above patch ...
> > >
> > > The merge window is coming up fast ... is anything happening about this
> > > failure?
> >
> > A new patch is coming, but I'm not sure this code has had enough review
> > from the core VFS folk.
> >
> > Please drop secure_uffd_v5.9 for the time being.
>
> You just need to remove/revert it from your security tree
> (git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git#next-testing).

In today's linux-next I have reverted the three commits in that branch:

d08ac70b1e0d Wire UFFD up to SELinux
2b72259a271a Teach SELinux about anonymous inodes
2749d3f84a70 Add a new LSM-supporting anonymous inode interface

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2020-08-04 03:36:56

by James Morris

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the security tree

On Thu, 30 Jul 2020, Stephen Rothwell wrote:

> Hi James,
>
> On Thu, 30 Jul 2020 12:35:03 +1000 (AEST) James Morris <[email protected]> wrote:
> >
> > On Thu, 30 Jul 2020, Stephen Rothwell wrote:
> >
> > > > I am still applying the above patch ...
> > >
> > > The merge window is coming up fast ... is anything happening about this
> > > failure?
> >
> > A new patch is coming, but I'm not sure this code has had enough review
> > from the core VFS folk.
> >
> > Please drop secure_uffd_v5.9 for the time being.
>
> You just need to remove/revert it from your security tree
> (git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git#next-testing).

Done.

--
James Morris
<[email protected]>