[PATCH -next] ima: Make arch_policy_entry static

Subsystems: extended verification module (evm), integrity measurement architecture (ima), security subsystem, the rest

STALE2684d

2 messages, 2 authors, 2019-06-13 · open the first message on its own page

[PATCH -next] ima: Make arch_policy_entry static

From: YueHaibing <hidden>
Date: 2019-06-11 13:40:55

Fix sparse warning:

security/integrity/ima/ima_policy.c:202:23: warning:
 symbol 'arch_policy_entry' was not declared. Should it be static?

Reported-by: Hulk Robot <redacted>
Signed-off-by: YueHaibing <redacted>
---
 security/integrity/ima/ima_policy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c
index 1cc822a..cd1b728 100644
--- a/security/integrity/ima/ima_policy.c
+++ b/security/integrity/ima/ima_policy.c
@@ -199,7 +199,7 @@ static struct ima_rule_entry secure_boot_rules[] __ro_after_init = {
 };
 
 /* An array of architecture specific rules */
-struct ima_rule_entry *arch_policy_entry __ro_after_init;
+static struct ima_rule_entry *arch_policy_entry __ro_after_init;
 
 static LIST_HEAD(ima_default_rules);
 static LIST_HEAD(ima_policy_rules);
-- 
2.7.4

Re: [PATCH -next] ima: Make arch_policy_entry static

From: Mimi Zohar <zohar@linux.ibm.com>
Date: 2019-06-13 15:38:39

On Tue, 2019-06-11 at 21:40 +0800, YueHaibing wrote:
Fix sparse warning:

security/integrity/ima/ima_policy.c:202:23: warning:
 symbol 'arch_policy_entry' was not declared. Should it be static?

Reported-by: Hulk Robot <redacted>
Signed-off-by: YueHaibing <redacted>
Thanks, this patch has been queued to be upstreamed.

Mimi
quoted hunk
---
 security/integrity/ima/ima_policy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c
index 1cc822a..cd1b728 100644
--- a/security/integrity/ima/ima_policy.c
+++ b/security/integrity/ima/ima_policy.c
@@ -199,7 +199,7 @@ static struct ima_rule_entry secure_boot_rules[] __ro_after_init = {
 };
 
 /* An array of architecture specific rules */
-struct ima_rule_entry *arch_policy_entry __ro_after_init;
+static struct ima_rule_entry *arch_policy_entry __ro_after_init;
 
 static LIST_HEAD(ima_default_rules);
 static LIST_HEAD(ima_policy_rules);

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help