trace: instrument security and console initcall
Subsystems (2)
PATCH 1/1 trace: instrument security and console initcall
Hi Steve,
This is the patch for security & console initcall's instrumentation
--- kernel/printk/printk.c | 7 ++++++- security/security.c | 8 +++++++- 2 files changed, 13 insertions(+), 2 deletions(-)
kernel/printk/printk.c +6 -1
@@ -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++; } }
security/security.c +7 -1
@@ -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++; } }
Signature · 1 line
2.11.0
kbuild test robot
build botThank you for the patch! Yet something to improve:
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
kbuild test robot
build botThank you for the patch! Yet something to improve:
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