2023-03-06 10:42:15

by Roberto Sassu

[permalink] [raw]
Subject: [PATCH] evm: Complete description of evm_inode_setattr()

From: Roberto Sassu <[email protected]>

Add the description for missing parameters of evm_inode_setattr() to
avoid the warning arising with W=n compile option.

Fixes: 817b54aa45db ("evm: add evm_inode_setattr to prevent updating an invalid security.evm")
Fixes: c1632a0f1120 ("fs: port ->setattr() to pass mnt_idmap")
Signed-off-by: Roberto Sassu <[email protected]>
---
security/integrity/evm/evm_main.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/security/integrity/evm/evm_main.c b/security/integrity/evm/evm_main.c
index cf24c525558..b1c2197473a 100644
--- a/security/integrity/evm/evm_main.c
+++ b/security/integrity/evm/evm_main.c
@@ -795,7 +795,9 @@ static int evm_attr_change(struct mnt_idmap *idmap,

/**
* evm_inode_setattr - prevent updating an invalid EVM extended attribute
+ * @idmap: idmap of the mount
* @dentry: pointer to the affected dentry
+ * @attr: iattr structure containing the new file attributes
*
* Permit update of file attributes when files have a valid EVM signature,
* except in the case of them having an immutable portable signature.
--
2.25.1



2023-06-05 12:01:38

by Roberto Sassu

[permalink] [raw]
Subject: Re: [PATCH] evm: Complete description of evm_inode_setattr()

On Mon, 2023-03-06 at 11:40 +0100, Roberto Sassu wrote:
> From: Roberto Sassu <[email protected]>
>
> Add the description for missing parameters of evm_inode_setattr() to
> avoid the warning arising with W=n compile option.
>
> Fixes: 817b54aa45db ("evm: add evm_inode_setattr to prevent updating an invalid security.evm")
> Fixes: c1632a0f1120 ("fs: port ->setattr() to pass mnt_idmap")
> Signed-off-by: Roberto Sassu <[email protected]>

Hi Mimi

this probably got lost. It was also reviewed by Stefan:

Reviewed-by: Stefan Berger <[email protected]>

Could you please take it?

Thanks

Roberto

> ---
> security/integrity/evm/evm_main.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/security/integrity/evm/evm_main.c b/security/integrity/evm/evm_main.c
> index cf24c525558..b1c2197473a 100644
> --- a/security/integrity/evm/evm_main.c
> +++ b/security/integrity/evm/evm_main.c
> @@ -795,7 +795,9 @@ static int evm_attr_change(struct mnt_idmap *idmap,
>
> /**
> * evm_inode_setattr - prevent updating an invalid EVM extended attribute
> + * @idmap: idmap of the mount
> * @dentry: pointer to the affected dentry
> + * @attr: iattr structure containing the new file attributes
> *
> * Permit update of file attributes when files have a valid EVM signature,
> * except in the case of them having an immutable portable signature.


2023-06-05 14:04:03

by Mimi Zohar

[permalink] [raw]
Subject: Re: [PATCH] evm: Complete description of evm_inode_setattr()

On Mon, 2023-06-05 at 13:57 +0200, Roberto Sassu wrote:
> On Mon, 2023-03-06 at 11:40 +0100, Roberto Sassu wrote:
> > From: Roberto Sassu <[email protected]>
> >
> > Add the description for missing parameters of evm_inode_setattr() to
> > avoid the warning arising with W=n compile option.
> >
> > Fixes: 817b54aa45db ("evm: add evm_inode_setattr to prevent updating an invalid security.evm")
> > Fixes: c1632a0f1120 ("fs: port ->setattr() to pass mnt_idmap")
> > Signed-off-by: Roberto Sassu <[email protected]>
>
> Hi Mimi
>
> this probably got lost. It was also reviewed by Stefan:
>
> Reviewed-by: Stefan Berger <[email protected]>
>
> Could you please take it?

Thanks for the reminder. In case kernel-doc changes are backported to
stable, I've added # v3.2+ and # v6.3+ respectively to the Fixes lines.

There are two other warnings in EVM. Any chance you're planning on
fixing them as well?

--
thanks,

Mimi




2023-06-05 14:07:11

by Roberto Sassu

[permalink] [raw]
Subject: Re: [PATCH] evm: Complete description of evm_inode_setattr()

On Mon, 2023-06-05 at 09:12 -0400, Mimi Zohar wrote:
> On Mon, 2023-06-05 at 13:57 +0200, Roberto Sassu wrote:
> > On Mon, 2023-03-06 at 11:40 +0100, Roberto Sassu wrote:
> > > From: Roberto Sassu <[email protected]>
> > >
> > > Add the description for missing parameters of evm_inode_setattr() to
> > > avoid the warning arising with W=n compile option.
> > >
> > > Fixes: 817b54aa45db ("evm: add evm_inode_setattr to prevent updating an invalid security.evm")
> > > Fixes: c1632a0f1120 ("fs: port ->setattr() to pass mnt_idmap")
> > > Signed-off-by: Roberto Sassu <[email protected]>
> >
> > Hi Mimi
> >
> > this probably got lost. It was also reviewed by Stefan:
> >
> > Reviewed-by: Stefan Berger <[email protected]>
> >
> > Could you please take it?
>
> Thanks for the reminder. In case kernel-doc changes are backported to
> stable, I've added # v3.2+ and # v6.3+ respectively to the Fixes lines.

Thanks!

> There are two other warnings in EVM. Any chance you're planning on
> fixing them as well?

Yes, will do.

Roberto