aboutsummaryrefslogtreecommitdiffstats
path: root/security/integrity/ima
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2010-04-22 10:49:36 -0400
committerJames Morris <jmorris@namei.org>2010-04-22 18:47:53 -0400
commiteb8dae9607901fd3fc181325ff3f30dce8f574c5 (patch)
tree1b6a0af7a1cd6b32a8cbb1512d91232895733bc5 /security/integrity/ima
parent34c111f626e91adb23f90a91d2c7cd4dac9fa4b1 (diff)
IMA: include the word IMA in printk messages
As an example IMA emits a warning when it can't find a TPM chip: "No TPM chip found, activating TPM-bypass!" This patch prefaces that message with IMA so we know what subsystem is bypassing the TPM. Do this for all pr_info and pr_err messages. Signed-off-by: Eric Paris <eparis@redhat.com> Acked-by: Mimi Zohar <zohar@us.ibm.com> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/integrity/ima')
-rw-r--r--security/integrity/ima/ima_crypto.c4
-rw-r--r--security/integrity/ima/ima_init.c2
-rw-r--r--security/integrity/ima/ima_queue.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/security/integrity/ima/ima_crypto.c b/security/integrity/ima/ima_crypto.c
index 46642a19bc78..acd4226f73ef 100644
--- a/security/integrity/ima/ima_crypto.c
+++ b/security/integrity/ima/ima_crypto.c
@@ -26,7 +26,7 @@ static int init_desc(struct hash_desc *desc)
26 26
27 desc->tfm = crypto_alloc_hash(ima_hash, 0, CRYPTO_ALG_ASYNC); 27 desc->tfm = crypto_alloc_hash(ima_hash, 0, CRYPTO_ALG_ASYNC);
28 if (IS_ERR(desc->tfm)) { 28 if (IS_ERR(desc->tfm)) {
29 pr_info("failed to load %s transform: %ld\n", 29 pr_info("IMA: failed to load %s transform: %ld\n",
30 ima_hash, PTR_ERR(desc->tfm)); 30 ima_hash, PTR_ERR(desc->tfm));
31 rc = PTR_ERR(desc->tfm); 31 rc = PTR_ERR(desc->tfm);
32 return rc; 32 return rc;
@@ -111,7 +111,7 @@ static void __init ima_pcrread(int idx, u8 *pcr)
111 return; 111 return;
112 112
113 if (tpm_pcr_read(TPM_ANY_NUM, idx, pcr) != 0) 113 if (tpm_pcr_read(TPM_ANY_NUM, idx, pcr) != 0)
114 pr_err("Error Communicating to TPM chip\n"); 114 pr_err("IMA: Error Communicating to TPM chip\n");
115} 115}
116 116
117/* 117/*
diff --git a/security/integrity/ima/ima_init.c b/security/integrity/ima/ima_init.c
index a40da7ae5900..b93eddc589e5 100644
--- a/security/integrity/ima/ima_init.c
+++ b/security/integrity/ima/ima_init.c
@@ -82,7 +82,7 @@ int __init ima_init(void)
82 ima_used_chip = 1; 82 ima_used_chip = 1;
83 83
84 if (!ima_used_chip) 84 if (!ima_used_chip)
85 pr_info("No TPM chip found, activating TPM-bypass!\n"); 85 pr_info("IMA: No TPM chip found, activating TPM-bypass!\n");
86 86
87 ima_add_boot_aggregate(); /* boot aggregate must be first entry */ 87 ima_add_boot_aggregate(); /* boot aggregate must be first entry */
88 ima_init_policy(); 88 ima_init_policy();
diff --git a/security/integrity/ima/ima_queue.c b/security/integrity/ima/ima_queue.c
index a0880e9c8e05..148a3d85e776 100644
--- a/security/integrity/ima/ima_queue.c
+++ b/security/integrity/ima/ima_queue.c
@@ -70,7 +70,7 @@ static int ima_add_digest_entry(struct ima_template_entry *entry)
70 70
71 qe = kmalloc(sizeof(*qe), GFP_KERNEL); 71 qe = kmalloc(sizeof(*qe), GFP_KERNEL);
72 if (qe == NULL) { 72 if (qe == NULL) {
73 pr_err("OUT OF MEMORY ERROR creating queue entry.\n"); 73 pr_err("IMA: OUT OF MEMORY ERROR creating queue entry.\n");
74 return -ENOMEM; 74 return -ENOMEM;
75 } 75 }
76 qe->entry = entry; 76 qe->entry = entry;
@@ -93,7 +93,7 @@ static int ima_pcr_extend(const u8 *hash)
93 93
94 result = tpm_pcr_extend(TPM_ANY_NUM, CONFIG_IMA_MEASURE_PCR_IDX, hash); 94 result = tpm_pcr_extend(TPM_ANY_NUM, CONFIG_IMA_MEASURE_PCR_IDX, hash);
95 if (result != 0) 95 if (result != 0)
96 pr_err("Error Communicating to TPM chip\n"); 96 pr_err("IMA: Error Communicating to TPM chip\n");
97 return result; 97 return result;
98} 98}
99 99