Skip to contentSkip to conversation

IMA: remove -Wmissing-prototypes warning

PATCH In review Austin Kim 2 participants 3 messages Jun 29, 2021

Subsystems (4)
lore
Share & tools
lore

Austin Kim

author
#0 lore raw

PATCH 1/1 IMA: remove -Wmissing-prototypes warning

From: Austin Kim <[email protected]>

With W=1 build, the compiler throws warning message as below:

security/integrity/ima/ima_mok.c:24:12: warning:
no previous prototype for ‘ima_mok_init’ [-Wmissing-prototypes]
__init int ima_mok_init(void)

Silence the warning by adding static keyword to ima_mok_init().

---
 security/integrity/ima/ima_mok.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
security/integrity/ima/ima_mok.c +1 -1
index 1e5c01916173..95cc31525c57 100644
@@ -21,7 +21,7 @@ struct key *ima_blacklist_keyring;
 /*
  * Allocate the IMA blacklist keyring
  */
-__init int ima_mok_init(void)
+static __init int ima_mok_init(void)
 {
 	struct key_restriction *restriction;
 
Signature · 1 line
2.20.1
maintainer
#1 lore raw

[Cc: Petko Manolov <[email protected]>]

Hi Austin,

Quoted 20 lines · Austin Kim

From: Austin Kim <[email protected]>

With W=1 build, the compiler throws warning message as below:

security/integrity/ima/ima_mok.c:24:12: warning:
no previous prototype for ‘ima_mok_init’ [-Wmissing-prototypes]
__init int ima_mok_init(void)

Silence the warning by adding static keyword to ima_mok_init().

---
 security/integrity/ima/ima_mok.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
security/integrity/ima/ima_mok.c +0 -0
index 1e5c01916173..95cc31525c57 100644

security/integrity/ima/ima_mok.c struct key *ima_blacklist_keyring; · line 27

Quoted 8 lines
security/integrity/ima/ima_mok.c +1 -1
@@ -21,7 +21,7 @@ struct key *ima_blacklist_keyring;
 /*
  * Allocate the IMA blacklist keyring
  */
-__init int ima_mok_init(void)
+static __init int ima_mok_init(void)
 {
 	struct key_restriction *restriction;
 

Thank you for the patch, which does fix the warning. The .ima_mok
keyring was removed a while ago. With all the recent work on the system blacklist, I'm wondering if anyone is still using the IMA blacklist keyring or whether it should be removed as well.

thanks,

Mimi

author
#2 lore raw

2021년 6월 29일 (화) 오후 11:30, Mimi Zohar <[email protected]>님이 작성:

Quoted 31 lines

[Cc: Petko Manolov <[email protected]>]

Hi Austin,

Quoted 25 lines · Austin Kim

From: Austin Kim <[email protected]>

With W=1 build, the compiler throws warning message as below:

security/integrity/ima/ima_mok.c:24:12: warning:
no previous prototype for ‘ima_mok_init’ [-Wmissing-prototypes]
__init int ima_mok_init(void)

Silence the warning by adding static keyword to ima_mok_init().

---
 security/integrity/ima/ima_mok.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
security/integrity/ima/ima_mok.c +1 -1
index 1e5c01916173..95cc31525c57 100644
@@ -21,7 +21,7 @@ struct key *ima_blacklist_keyring;
 /*
  * Allocate the IMA blacklist keyring
  */
-__init int ima_mok_init(void)
+static __init int ima_mok_init(void)
Quoted 8 lines

security/integrity/ima/ima_mok.c struct key *ima_blacklist_keyring; · line 27

Quoted 3 lines
security/integrity/ima/ima_mok.c +0 -0
 {
      struct key_restriction *restriction;
 

Thank you for the patch, which does fix the warning. The .ima_mok
keyring was removed a while ago. With all the recent work on the system blacklist, I'm wondering if anyone is still using the IMA blacklist keyring or whether it should be removed as well.

Oh! Thanks for information.

Quoted 5 lines

thanks,

Mimi