diff mbox series

[v2] KEYS: trusted: add missing MODULE_DESCRIPTION()

Message ID 20240530-md-trusted-v2-1-151f0c7be272@quicinc.com (mailing list archive)
State Superseded
Delegated to: Paul Moore
Headers show
Series [v2] KEYS: trusted: add missing MODULE_DESCRIPTION() | expand

Commit Message

Jeff Johnson May 30, 2024, 2:43 p.m. UTC
kbuild reports:

WARNING: modpost: missing MODULE_DESCRIPTION() in security/keys/trusted-keys/trusted.o

Add the missing MODULE_DESCRIPTION() macro invocation.

Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
---
Changes in v2:
- reword commit text per Jarkko's guidance
- Link to v1: https://lore.kernel.org/r/20240529-md-trusted-v1-1-56c9a0ae8e28@quicinc.com
---
 security/keys/trusted-keys/trusted_core.c | 1 +
 1 file changed, 1 insertion(+)


---
base-commit: 4a4be1ad3a6efea16c56615f31117590fd881358
change-id: 20240529-md-trusted-6e6fd26299ad

Comments

Jarkko Sakkinen June 4, 2024, 4:43 p.m. UTC | #1
On Thu May 30, 2024 at 5:43 PM EEST, Jeff Johnson wrote:
> kbuild reports:
>
> WARNING: modpost: missing MODULE_DESCRIPTION() in security/keys/trusted-keys/trusted.o
>
> Add the missing MODULE_DESCRIPTION() macro invocation.
>
> Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
> ---
> Changes in v2:
> - reword commit text per Jarkko's guidance
> - Link to v1: https://lore.kernel.org/r/20240529-md-trusted-v1-1-56c9a0ae8e28@quicinc.com
> ---
>  security/keys/trusted-keys/trusted_core.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/security/keys/trusted-keys/trusted_core.c b/security/keys/trusted-keys/trusted_core.c
> index 5113aeae5628..f4ab16d59663 100644
> --- a/security/keys/trusted-keys/trusted_core.c
> +++ b/security/keys/trusted-keys/trusted_core.c
> @@ -395,4 +395,5 @@ static void __exit cleanup_trusted(void)
>  late_initcall(init_trusted);
>  module_exit(cleanup_trusted);
>  
> +MODULE_DESCRIPTION("Trusted Key support");

First this should be just "Trusted key type".

Second: neither encrypted keys has the description.

So I'd consider also "Encrypted key type" for that one.

So this really needs two patches to be done properly.

BR, Jarkko
Jeff Johnson June 7, 2024, 12:41 a.m. UTC | #2
On 6/4/2024 9:43 AM, Jarkko Sakkinen wrote:
> On Thu May 30, 2024 at 5:43 PM EEST, Jeff Johnson wrote:
>> kbuild reports:
>>
>> WARNING: modpost: missing MODULE_DESCRIPTION() in security/keys/trusted-keys/trusted.o
>>
>> Add the missing MODULE_DESCRIPTION() macro invocation.
>>
>> Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
>> ---
>> Changes in v2:
>> - reword commit text per Jarkko's guidance
>> - Link to v1: https://lore.kernel.org/r/20240529-md-trusted-v1-1-56c9a0ae8e28@quicinc.com
>> ---
>>  security/keys/trusted-keys/trusted_core.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/security/keys/trusted-keys/trusted_core.c b/security/keys/trusted-keys/trusted_core.c
>> index 5113aeae5628..f4ab16d59663 100644
>> --- a/security/keys/trusted-keys/trusted_core.c
>> +++ b/security/keys/trusted-keys/trusted_core.c
>> @@ -395,4 +395,5 @@ static void __exit cleanup_trusted(void)
>>  late_initcall(init_trusted);
>>  module_exit(cleanup_trusted);
>>  
>> +MODULE_DESCRIPTION("Trusted Key support");
> 
> First this should be just "Trusted key type".

OK, I can make that change in v3

> 
> Second: neither encrypted keys has the description.
> 
> So I'd consider also "Encrypted key type" for that one.
> 
> So this really needs two patches to be done properly.

In my x86 allmodconfig build I'm getting a single warning in security/keys:

WARNING: modpost: missing MODULE_DESCRIPTION() in security/keys/trusted-keys/trusted.o

And my current patch fixes that warning.

But I do see that security/keys/encrypted-keys/encrypted.c has a 
MODULE_LICENSE() but not a MODULE_DESCRIPTION().  Looks like that doesn't 
generate warning because it isn't built as a module, even in an allmodconfig 
build:
CONFIG_TRUSTED_KEYS=m
CONFIG_HAVE_TRUSTED_KEYS=y
CONFIG_TRUSTED_KEYS_TPM=y
CONFIG_TRUSTED_KEYS_TEE=y
CONFIG_ENCRYPTED_KEYS=y

But I'll add a MODULE_DESCRIPTION() in case it is ever built as a module.

/jeff
diff mbox series

Patch

diff --git a/security/keys/trusted-keys/trusted_core.c b/security/keys/trusted-keys/trusted_core.c
index 5113aeae5628..f4ab16d59663 100644
--- a/security/keys/trusted-keys/trusted_core.c
+++ b/security/keys/trusted-keys/trusted_core.c
@@ -395,4 +395,5 @@  static void __exit cleanup_trusted(void)
 late_initcall(init_trusted);
 module_exit(cleanup_trusted);
 
+MODULE_DESCRIPTION("Trusted Key support");
 MODULE_LICENSE("GPL");