summaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorPetr Vorel <pvorel@suse.cz>2018-04-24 10:30:38 -0400
committerMimi Zohar <zohar@linux.vnet.ibm.com>2018-05-17 07:49:12 -0400
commitde636769c8c7359dacccca61d6c187d864d1d3b8 (patch)
tree5990e3d3715a588b370af5bd097baf5155909d2a /security
parentffb122de9a60bd789422fd9caa4d8363acf1e851 (diff)
ima: Unify logging
Define pr_fmt everywhere. Signed-off-by: Petr Vorel <pvorel@suse.cz> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> (powerpc build error) Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com> Changelog: Previous pr_fmt definition was too late and caused problems in powerpc allyesconfg build.
Diffstat (limited to 'security')
-rw-r--r--security/integrity/ima/ima_fs.c7
-rw-r--r--security/integrity/ima/ima_kexec.c2
-rw-r--r--security/integrity/ima/ima_template_lib.c2
3 files changed, 9 insertions, 2 deletions
diff --git a/security/integrity/ima/ima_fs.c b/security/integrity/ima/ima_fs.c
index c1265127d1b6..b34cec78ffb3 100644
--- a/security/integrity/ima/ima_fs.c
+++ b/security/integrity/ima/ima_fs.c
@@ -15,6 +15,9 @@
15 * implemenents security file system for reporting 15 * implemenents security file system for reporting
16 * current measurement list and IMA statistics 16 * current measurement list and IMA statistics
17 */ 17 */
18
19#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
20
18#include <linux/fcntl.h> 21#include <linux/fcntl.h>
19#include <linux/slab.h> 22#include <linux/slab.h>
20#include <linux/module.h> 23#include <linux/module.h>
@@ -336,7 +339,7 @@ static ssize_t ima_write_policy(struct file *file, const char __user *buf,
336 if (data[0] == '/') { 339 if (data[0] == '/') {
337 result = ima_read_policy(data); 340 result = ima_read_policy(data);
338 } else if (ima_appraise & IMA_APPRAISE_POLICY) { 341 } 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");
340 integrity_audit_msg(AUDIT_INTEGRITY_STATUS, NULL, NULL, 343 integrity_audit_msg(AUDIT_INTEGRITY_STATUS, NULL, NULL,
341 "policy_update", "signed policy required", 344 "policy_update", "signed policy required",
342 1, 0); 345 1, 0);
@@ -417,7 +420,7 @@ static int ima_release_policy(struct inode *inode, struct file *file)
417 valid_policy = 0; 420 valid_policy = 0;
418 } 421 }
419 422
420 pr_info("IMA: policy update %s\n", cause); 423 pr_info("policy update %s\n", cause);
421 integrity_audit_msg(AUDIT_INTEGRITY_STATUS, NULL, NULL, 424 integrity_audit_msg(AUDIT_INTEGRITY_STATUS, NULL, NULL,
422 "policy_update", cause, !valid_policy, 0); 425 "policy_update", cause, !valid_policy, 0);
423 426
diff --git a/security/integrity/ima/ima_kexec.c b/security/integrity/ima/ima_kexec.c
index e473eee913cb..16bd18747cfa 100644
--- a/security/integrity/ima/ima_kexec.c
+++ b/security/integrity/ima/ima_kexec.c
@@ -10,6 +10,8 @@
10 * the Free Software Foundation; either version 2 of the License, or 10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version. 11 * (at your option) any later version.
12 */ 12 */
13#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
14
13#include <linux/seq_file.h> 15#include <linux/seq_file.h>
14#include <linux/vmalloc.h> 16#include <linux/vmalloc.h>
15#include <linux/kexec.h> 17#include <linux/kexec.h>
diff --git a/security/integrity/ima/ima_template_lib.c b/security/integrity/ima/ima_template_lib.c
index 5afaa53decc5..43752002c222 100644
--- a/security/integrity/ima/ima_template_lib.c
+++ b/security/integrity/ima/ima_template_lib.c
@@ -13,6 +13,8 @@
13 * Library of supported template fields. 13 * Library of supported template fields.
14 */ 14 */
15 15
16#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
17
16#include "ima_template_lib.h" 18#include "ima_template_lib.h"
17 19
18static bool ima_template_hash_algo_allowed(u8 algo) 20static bool ima_template_hash_algo_allowed(u8 algo)