2021-02-16 07:26:39

by Juergen Borleis

[permalink] [raw]
Subject: fs: ubifs: set s_uuid in super block to support ima/evm uuid options

This is V2 to support ima/evm uuid in ubifs.

- the previously used memcopy is now replaced by a helper function as suggested
by Andy

jb



2021-02-16 07:27:12

by Juergen Borleis

[permalink] [raw]
Subject: [PATCH v2] fs: ubifs: set s_uuid in super block to support ima/evm uuid options

From: Steffen Trumtrar <[email protected]>

This is required to provide uuid based integrity functionality for:
ima_policy (fsuuid option) and the 'evmctl' command ('--uuid' option).

Co-developed-by: Oleksij Rempel <[email protected]>
Co-developed-by: Juergen Borleis <[email protected]>
Signed-off-by: Steffen Trumtrar <[email protected]>
---
fs/ubifs/super.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index 138b9426c6c1..a8383ca39a47 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -2230,6 +2230,8 @@ static int ubifs_fill_super(struct super_block *sb, void *data, int silent)
goto out_umount;
}

+ import_uuid(&sb->s_uuid, c->uuid);
+
mutex_unlock(&c->umount_mutex);
return 0;

--
2.20.1

2021-02-16 09:11:38

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH v2] fs: ubifs: set s_uuid in super block to support ima/evm uuid options

On Tue, Feb 16, 2021 at 9:24 AM Juergen Borleis <[email protected]> wrote:
>
> From: Steffen Trumtrar <[email protected]>
>
> This is required to provide uuid based integrity functionality for:
> ima_policy (fsuuid option) and the 'evmctl' command ('--uuid' option).

Reviewed-by: Andy Shevchenko <[email protected]>
One issue below has to be addressed nevertheless.

> Co-developed-by: Oleksij Rempel <[email protected]>
> Co-developed-by: Juergen Borleis <[email protected]>

According to the documentation [1] above has two issues:
- all Co-developed-by *must* be accompanied with corresponding SoBs
- commiter must provide his SoB (but it will be implied by the
previous requirement in this case)

[1]: https://www.kernel.org/doc/html/latest/process/submitting-patches.html#when-to-use-acked-by-cc-and-co-developed-by

> Signed-off-by: Steffen Trumtrar <[email protected]>
> ---
> fs/ubifs/super.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
> index 138b9426c6c1..a8383ca39a47 100644
> --- a/fs/ubifs/super.c
> +++ b/fs/ubifs/super.c
> @@ -2230,6 +2230,8 @@ static int ubifs_fill_super(struct super_block *sb, void *data, int silent)
> goto out_umount;
> }
>
> + import_uuid(&sb->s_uuid, c->uuid);
> +
> mutex_unlock(&c->umount_mutex);
> return 0;
>
> --
> 2.20.1
>


--
With Best Regards,
Andy Shevchenko

2021-02-16 09:14:49

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH v2] fs: ubifs: set s_uuid in super block to support ima/evm uuid options

+Cc: Stephen

Stephen, do you have a check in Linux Next to catch the problem that
Co-developed-by is not being accompanied by a corresponding SoB?

On Tue, Feb 16, 2021 at 11:09 AM Andy Shevchenko
<[email protected]> wrote:
>
> On Tue, Feb 16, 2021 at 9:24 AM Juergen Borleis <[email protected]> wrote:
> >
> > From: Steffen Trumtrar <[email protected]>
> >
> > This is required to provide uuid based integrity functionality for:
> > ima_policy (fsuuid option) and the 'evmctl' command ('--uuid' option).
>
> Reviewed-by: Andy Shevchenko <[email protected]>
> One issue below has to be addressed nevertheless.
>
> > Co-developed-by: Oleksij Rempel <[email protected]>
> > Co-developed-by: Juergen Borleis <[email protected]>
>
> According to the documentation [1] above has two issues:
> - all Co-developed-by *must* be accompanied with corresponding SoBs
> - commiter must provide his SoB (but it will be implied by the
> previous requirement in this case)
>
> [1]: https://www.kernel.org/doc/html/latest/process/submitting-patches.html#when-to-use-acked-by-cc-and-co-developed-by
>
> > Signed-off-by: Steffen Trumtrar <[email protected]>
> > ---
> > fs/ubifs/super.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
> > index 138b9426c6c1..a8383ca39a47 100644
> > --- a/fs/ubifs/super.c
> > +++ b/fs/ubifs/super.c
> > @@ -2230,6 +2230,8 @@ static int ubifs_fill_super(struct super_block *sb, void *data, int silent)
> > goto out_umount;
> > }
> >
> > + import_uuid(&sb->s_uuid, c->uuid);
> > +
> > mutex_unlock(&c->umount_mutex);
> > return 0;
> >
> > --
> > 2.20.1
> >
>
>
> --
> With Best Regards,
> Andy Shevchenko



--
With Best Regards,
Andy Shevchenko

2021-02-16 09:56:46

by Stephen Rothwell

[permalink] [raw]
Subject: Re: [PATCH v2] fs: ubifs: set s_uuid in super block to support ima/evm uuid options

Hi Andy,

On Tue, 16 Feb 2021 11:11:08 +0200 Andy Shevchenko <[email protected]> wrote:
>
> Stephen, do you have a check in Linux Next to catch the problem that
> Co-developed-by is not being accompanied by a corresponding SoB?

No, but I will see about adding one. Thanks fo rthe heads up.

--
Cheers,
Stephen Rothwell


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