* [PATCH -next] integrity: Make function integrity_add_key() static
@ 2021-02-10 8:01 Wei Yongjun
2021-02-10 20:52 ` Kees Cook
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Wei Yongjun @ 2021-02-10 8:01 UTC (permalink / raw)
To: Hulk Robot, James Morris, Serge E. Hallyn, Greg Kroah-Hartman,
Mimi Zohar, Kees Cook, Scott Branden, Luis Chamberlain,
Tushar Sugandhi
Cc: Wei Yongjun, linux-security-module
The sparse tool complains as follows:
security/integrity/digsig.c:146:12: warning:
symbol 'integrity_add_key' was not declared. Should it be static?
This function is not used outside of digsig.c, so this
commit marks it static.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
security/integrity/digsig.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/security/integrity/digsig.c b/security/integrity/digsig.c
index 0f518dcfde05..250fb0836156 100644
--- a/security/integrity/digsig.c
+++ b/security/integrity/digsig.c
@@ -143,8 +143,8 @@ int __init integrity_init_keyring(const unsigned int id)
return __integrity_init_keyring(id, perm, restriction);
}
-int __init integrity_add_key(const unsigned int id, const void *data,
- off_t size, key_perm_t perm)
+static int __init integrity_add_key(const unsigned int id, const void *data,
+ off_t size, key_perm_t perm)
{
key_ref_t key;
int rc = 0;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH -next] integrity: Make function integrity_add_key() static
2021-02-10 8:01 [PATCH -next] integrity: Make function integrity_add_key() static Wei Yongjun
@ 2021-02-10 20:52 ` Kees Cook
2021-02-12 16:11 ` Nayna
2021-02-12 16:21 ` Mimi Zohar
2 siblings, 0 replies; 4+ messages in thread
From: Kees Cook @ 2021-02-10 20:52 UTC (permalink / raw)
To: Wei Yongjun
Cc: Hulk Robot, James Morris, Serge E. Hallyn, Greg Kroah-Hartman,
Mimi Zohar, Scott Branden, Luis Chamberlain, Tushar Sugandhi,
linux-security-module
On Wed, Feb 10, 2021 at 08:01:31AM +0000, Wei Yongjun wrote:
> The sparse tool complains as follows:
>
> security/integrity/digsig.c:146:12: warning:
> symbol 'integrity_add_key' was not declared. Should it be static?
>
> This function is not used outside of digsig.c, so this
> commit marks it static.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
--
Kees Cook
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -next] integrity: Make function integrity_add_key() static
2021-02-10 8:01 [PATCH -next] integrity: Make function integrity_add_key() static Wei Yongjun
2021-02-10 20:52 ` Kees Cook
@ 2021-02-12 16:11 ` Nayna
2021-02-12 16:21 ` Mimi Zohar
2 siblings, 0 replies; 4+ messages in thread
From: Nayna @ 2021-02-12 16:11 UTC (permalink / raw)
To: Wei Yongjun
Cc: linux-security-module, Scott Branden, Hulk Robot, James Morris,
Serge E. Hallyn, Greg Kroah-Hartman, Mimi Zohar, Kees Cook,
Tushar Sugandhi, Luis Chamberlain
On 2/10/21 3:01 AM, Wei Yongjun wrote:
> The sparse tool complains as follows:
>
> security/integrity/digsig.c:146:12: warning:
> symbol 'integrity_add_key' was not declared. Should it be static?
>
> This function is not used outside of digsig.c, so this
> commit marks it static.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
> security/integrity/digsig.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/security/integrity/digsig.c b/security/integrity/digsig.c
> index 0f518dcfde05..250fb0836156 100644
> --- a/security/integrity/digsig.c
> +++ b/security/integrity/digsig.c
> @@ -143,8 +143,8 @@ int __init integrity_init_keyring(const unsigned int id)
> return __integrity_init_keyring(id, perm, restriction);
> }
>
> -int __init integrity_add_key(const unsigned int id, const void *data,
> - off_t size, key_perm_t perm)
> +static int __init integrity_add_key(const unsigned int id, const void *data,
> + off_t size, key_perm_t perm)
> {
> key_ref_t key;
> int rc = 0;
Reviewed-by: Nayna Jain <nayna@linux.ibm.com>
Thanks & Regards,
- Nayna
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -next] integrity: Make function integrity_add_key() static
2021-02-10 8:01 [PATCH -next] integrity: Make function integrity_add_key() static Wei Yongjun
2021-02-10 20:52 ` Kees Cook
2021-02-12 16:11 ` Nayna
@ 2021-02-12 16:21 ` Mimi Zohar
2 siblings, 0 replies; 4+ messages in thread
From: Mimi Zohar @ 2021-02-12 16:21 UTC (permalink / raw)
To: Wei Yongjun, Hulk Robot, James Morris, Serge E. Hallyn,
Greg Kroah-Hartman, Kees Cook, Scott Branden, Luis Chamberlain,
Tushar Sugandhi
Cc: linux-security-module, linux-integrity
[Cc: linux-integrity]
On Wed, 2021-02-10 at 08:01 +0000, Wei Yongjun wrote:
> The sparse tool complains as follows:
>
> security/integrity/digsig.c:146:12: warning:
> symbol 'integrity_add_key' was not declared. Should it be static?
>
> This function is not used outside of digsig.c, so this
> commit marks it static.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Thanks! The patch is now queued.
Mimi
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-02-12 16:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-10 8:01 [PATCH -next] integrity: Make function integrity_add_key() static Wei Yongjun
2021-02-10 20:52 ` Kees Cook
2021-02-12 16:11 ` Nayna
2021-02-12 16:21 ` Mimi Zohar
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.