Skip to contentSkip to conversation

fs: ubifs: set s_uuid in super block to support ima/evm uuid options

PATCH In review Juergen Borleis 3 participants 5 messages Feb 16, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

#1 lore raw

PATCH v2 1/1 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).

---
 fs/ubifs/super.c | 2 ++
 1 file changed, 2 insertions(+)
fs/ubifs/super.c +2 -0
index 138b9426c6c1..a8383ca39a47 100644
@@ -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;
 
Signature · 1 line
2.20.1
Reviewed-by on v2 1/1
#2 lore raw
Quoted 5 lines · Juergen Borleis

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

One issue below has to be addressed nevertheless.

Quoted 2 lines

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

Quoted 21 lines
---
 fs/ubifs/super.c | 2 ++
 1 file changed, 2 insertions(+)
fs/ubifs/super.c +2 -1
index 138b9426c6c1..a8383ca39a47 100644
@@ -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

Signature · 6 lines
With Best Regards,
Andy Shevchenko

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
#3 lore raw

+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?

Quoted 47 lines · Andy Shevchenko
Quoted 5 lines · Juergen Borleis

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

One issue below has to be addressed nevertheless.

Quoted 2 lines

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

Quoted 19 lines
---
 fs/ubifs/super.c | 2 ++
 1 file changed, 2 insertions(+)
fs/ubifs/super.c +2 -1
index 138b9426c6c1..a8383ca39a47 100644
@@ -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;
 
--
Quoted 2 lines

2.20.1

--
With Best Regards,
Andy Shevchenko

Signature · 6 lines
With Best Regards,
Andy Shevchenko

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
#4 lore raw

Hi Andy,

Quoted 3 lines · On Tue, 16 Feb 2021 11:11:08 +0200 Andy Shevchenko <[email protected]>…

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.

Signature · 2 lines
Cheers,
Stephen Rothwell