[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <0d49520be87d34c477a494c848953adb9da78f72.1393279025.git.joe@perches.com>
Date: Mon, 24 Feb 2014 14:00:01 -0800
From: Joe Perches <joe@...ches.com>
To: linux-kernel@...r.kernel.org
Cc: James Morris <james.l.morris@...cle.com>,
linux-security-module@...r.kernel.org
Subject: [PATCH 8/8] security: yama: Use a more current logging style
Convert printks to pr_<level>.
Add pr_fmt to prefix with "yama: "
Convert printk_ratelimited to pr_<level>_ratelimited.
Signed-off-by: Joe Perches <joe@...ches.com>
---
security/yama/yama_lsm.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/security/yama/yama_lsm.c b/security/yama/yama_lsm.c
index 13c88fbc..9de0f2b 100644
--- a/security/yama/yama_lsm.c
+++ b/security/yama/yama_lsm.c
@@ -12,6 +12,8 @@
*
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/security.h>
#include <linux/sysctl.h>
#include <linux/ptrace.h>
@@ -319,9 +321,8 @@ int yama_ptrace_access_check(struct task_struct *child,
}
if (rc) {
- printk_ratelimited(KERN_NOTICE
- "ptrace of pid %d was attempted by: %s (pid %d)\n",
- child->pid, current->comm, current->pid);
+ pr_notice_ratelimited("ptrace of pid %d was attempted by: %s (pid %d)\n",
+ child->pid, current->comm, current->pid);
}
return rc;
@@ -356,9 +357,8 @@ int yama_ptrace_traceme(struct task_struct *parent)
}
if (rc) {
- printk_ratelimited(KERN_NOTICE
- "ptraceme of pid %d was attempted by: %s (pid %d)\n",
- current->pid, parent->comm, parent->pid);
+ pr_notice_ratelimited("ptraceme of pid %d was attempted by: %s (pid %d)\n",
+ current->pid, parent->comm, parent->pid);
}
return rc;
@@ -425,16 +425,16 @@ static __init int yama_init(void)
return 0;
#endif
- printk(KERN_INFO "Yama: becoming mindful.\n");
+ pr_info("becoming mindful\n");
#ifndef CONFIG_SECURITY_YAMA_STACKED
if (register_security(&yama_ops))
- panic("Yama: kernel registration failed.\n");
+ panic("Yama: kernel registration failed\n");
#endif
#ifdef CONFIG_SYSCTL
if (!register_sysctl_paths(yama_sysctl_path, yama_sysctl_table))
- panic("Yama: sysctl registration failed.\n");
+ panic("Yama: sysctl registration failed\n");
#endif
return 0;
--
1.8.1.2.459.gbcd45b4.dirty
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists