* [PATCH] trace: instrument security and console initcall
@ 2018-03-23 0:33 Abderrahmane Benbachir
2018-03-24 14:11 ` kbuild test robot
2018-03-24 15:14 ` kbuild test robot
0 siblings, 2 replies; 3+ messages in thread
From: Abderrahmane Benbachir @ 2018-03-23 0:33 UTC (permalink / raw)
To: rostedt; +Cc: mingo, peterz, linux-kernel
Hi Steve,
This is the patch for security & console initcall's instrumentation
Signed-off-by: Abderrahmane Benbachir <abderrahmane.benbachir@polymtl.ca>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org
---
kernel/printk/printk.c | 7 ++++++-
security/security.c | 8 +++++++-
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index f274fbef821d..0f10cfd1588e 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -52,6 +52,7 @@
#include <linux/uaccess.h>
#include <asm/sections.h>
+#include <trace/events/boot.h>
#define CREATE_TRACE_POINTS
#include <trace/events/printk.h>
@@ -2781,6 +2782,7 @@ EXPORT_SYMBOL(unregister_console);
*/
void __init console_init(void)
{
+ int ret;
initcall_t *call;
/* Setup the default TTY line discipline. */
@@ -2791,8 +2793,11 @@ void __init console_init(void)
* inform about problems etc..
*/
call = __con_initcall_start;
+ trace_initcall_level("console");
while (call < __con_initcall_end) {
- (*call)();
+ trace_initcall_start((*call));
+ ret = (*call)();
+ trace_initcall_finish((*call), ret);
call++;
}
}
diff --git a/security/security.c b/security/security.c
index 1cd8526cb0b7..9de51d599bb4 100644
--- a/security/security.c
+++ b/security/security.c
@@ -30,6 +30,8 @@
#include <linux/string.h>
#include <net/flow.h>
+#include <trace/events/boot.h>
+
#define MAX_LSM_EVM_XATTR 2
/* Maximum number of letters for an LSM name string */
@@ -45,10 +47,14 @@ static __initdata char chosen_lsm[SECURITY_NAME_MAX + 1] =
static void __init do_security_initcalls(void)
{
+ int ret;
initcall_t *call;
call = __security_initcall_start;
+ trace_initcall_level("security");
while (call < __security_initcall_end) {
- (*call) ();
+ trace_initcall_start((*call));
+ ret = (*call) ();
+ trace_initcall_finish((*call), ret);
call++;
}
}
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] trace: instrument security and console initcall
2018-03-23 0:33 [PATCH] trace: instrument security and console initcall Abderrahmane Benbachir
@ 2018-03-24 14:11 ` kbuild test robot
2018-03-24 15:14 ` kbuild test robot
1 sibling, 0 replies; 3+ messages in thread
From: kbuild test robot @ 2018-03-24 14:11 UTC (permalink / raw)
To: Abderrahmane Benbachir; +Cc: kbuild-all, rostedt, mingo, peterz, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1125 bytes --]
Hi Abderrahmane,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v4.16-rc6 next-20180323]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Abderrahmane-Benbachir/trace-instrument-security-and-console-initcall/20180324-215004
config: i386-tinyconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All errors (new ones prefixed by >>):
>> kernel/printk/printk.c:55:10: fatal error: trace/events/boot.h: No such file or directory
#include <trace/events/boot.h>
^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
vim +55 kernel/printk/printk.c
54
> 55 #include <trace/events/boot.h>
56 #define CREATE_TRACE_POINTS
57 #include <trace/events/printk.h>
58
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 6733 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] trace: instrument security and console initcall
2018-03-23 0:33 [PATCH] trace: instrument security and console initcall Abderrahmane Benbachir
2018-03-24 14:11 ` kbuild test robot
@ 2018-03-24 15:14 ` kbuild test robot
1 sibling, 0 replies; 3+ messages in thread
From: kbuild test robot @ 2018-03-24 15:14 UTC (permalink / raw)
To: Abderrahmane Benbachir; +Cc: kbuild-all, rostedt, mingo, peterz, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1064 bytes --]
Hi Abderrahmane,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v4.16-rc6 next-20180323]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Abderrahmane-Benbachir/trace-instrument-security-and-console-initcall/20180324-215004
config: i386-randconfig-s0-201811 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All errors (new ones prefixed by >>):
>> security/security.c:33:31: fatal error: trace/events/boot.h: No such file or directory
#include <trace/events/boot.h>
^
compilation terminated.
vim +33 security/security.c
32
> 33 #include <trace/events/boot.h>
34
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28288 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-03-24 15:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-23 0:33 [PATCH] trace: instrument security and console initcall Abderrahmane Benbachir
2018-03-24 14:11 ` kbuild test robot
2018-03-24 15:14 ` kbuild test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).