diff mbox

[-next] ima: fix non static symbol warnings

Message ID 1474817779-18587-1-git-send-email-weiyj.lk@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Wei Yongjun Sept. 25, 2016, 3:36 p.m. UTC
From: Wei Yongjun <weiyongjun1@huawei.com>

Fixes the following sparse warnings:

security/integrity/ima/ima_kexec.c:122:23: warning:
 symbol 'update_buffer_nb' was not declared. Should it be static?
security/integrity/ima/ima_kexec.c:130:6: warning:
 symbol 'ima_add_kexec_buffer' was not declared. Should it be static?

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 security/integrity/ima/ima_kexec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)




--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Mimi Zohar Sept. 26, 2016, 6:12 p.m. UTC | #1
On Sun, 2016-09-25 at 15:36 +0000, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
> 
> Fixes the following sparse warnings:
> 
> security/integrity/ima/ima_kexec.c:122:23: warning:
>  symbol 'update_buffer_nb' was not declared. Should it be static?
> security/integrity/ima/ima_kexec.c:130:6: warning:
>  symbol 'ima_add_kexec_buffer' was not declared. Should it be static?

Thank you for reporting this sparse error.   With the latest patch set
that I just posted, the ability to carry additional measurements after
the kexec load has been, for at least for the time being, removed.

Mimi

--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/security/integrity/ima/ima_kexec.c b/security/integrity/ima/ima_kexec.c
index 878c062..0a7ab39 100644
--- a/security/integrity/ima/ima_kexec.c
+++ b/security/integrity/ima/ima_kexec.c
@@ -119,7 +119,7 @@  static int ima_update_kexec_buffer(struct notifier_block *self,
 	return NOTIFY_OK;
 }
 
-struct notifier_block update_buffer_nb = {
+static struct notifier_block update_buffer_nb = {
 	.notifier_call = ima_update_kexec_buffer,
 };
 
@@ -127,7 +127,7 @@  struct notifier_block update_buffer_nb = {
  * Called during kexec_file_load so that IMA can add a segment to the kexec
  * image for the measurement list for the next kernel.
  */
-void ima_add_kexec_buffer(struct kimage *image)
+static void ima_add_kexec_buffer(struct kimage *image)
 {
 	static int registered;
 	struct kexec_buf kbuf = { .image = image, .buf_align = PAGE_SIZE,