Skip to content

Commit de63676

Browse files
pevikMimi Zohar
authored andcommitted
ima: Unify logging
Define pr_fmt everywhere. Signed-off-by: Petr Vorel <[email protected]> Reported-by: Stephen Rothwell <[email protected]> (powerpc build error) Signed-off-by: Mimi Zohar <[email protected]> Changelog: Previous pr_fmt definition was too late and caused problems in powerpc allyesconfg build.
1 parent ffb122d commit de63676

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

security/integrity/ima/ima_fs.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
* implemenents security file system for reporting
1616
* current measurement list and IMA statistics
1717
*/
18+
19+
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
20+
1821
#include <linux/fcntl.h>
1922
#include <linux/slab.h>
2023
#include <linux/module.h>
@@ -336,7 +339,7 @@ static ssize_t ima_write_policy(struct file *file, const char __user *buf,
336339
if (data[0] == '/') {
337340
result = ima_read_policy(data);
338341
} else if (ima_appraise & IMA_APPRAISE_POLICY) {
339-
pr_err("IMA: signed policy file (specified as an absolute pathname) required\n");
342+
pr_err("signed policy file (specified as an absolute pathname) required\n");
340343
integrity_audit_msg(AUDIT_INTEGRITY_STATUS, NULL, NULL,
341344
"policy_update", "signed policy required",
342345
1, 0);
@@ -417,7 +420,7 @@ static int ima_release_policy(struct inode *inode, struct file *file)
417420
valid_policy = 0;
418421
}
419422

420-
pr_info("IMA: policy update %s\n", cause);
423+
pr_info("policy update %s\n", cause);
421424
integrity_audit_msg(AUDIT_INTEGRITY_STATUS, NULL, NULL,
422425
"policy_update", cause, !valid_policy, 0);
423426

security/integrity/ima/ima_kexec.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
* the Free Software Foundation; either version 2 of the License, or
1111
* (at your option) any later version.
1212
*/
13+
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
14+
1315
#include <linux/seq_file.h>
1416
#include <linux/vmalloc.h>
1517
#include <linux/kexec.h>

security/integrity/ima/ima_template_lib.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
* Library of supported template fields.
1414
*/
1515

16+
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
17+
1618
#include "ima_template_lib.h"
1719

1820
static bool ima_template_hash_algo_allowed(u8 algo)

0 commit comments

Comments
 (0)