lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <480e19e0b30c412a77f5030ad6c2bd350819bd12.1268749695.git.jbaron@redhat.com>
Date:	Tue, 16 Mar 2010 13:47:16 -0400
From:	Jason Baron <jbaron@...hat.com>
To:	fweisbec@...il.com, mingo@...e.hu, rostedt@...dmis.org
Cc:	linux-kernel@...r.kernel.org, laijs@...fujitsu.com,
	lizf@...fujitsu.com, hpa@...or.com, tglx@...utronix.de,
	mhiramat@...hat.com, heiko.carstens@...ibm.com,
	benh@...nel.crashing.org, davem@...emloft.net, lethal@...ux-sh.org,
	schwidefsky@...ibm.com, brueckner@...ux.vnet.ibm.com,
	tony.luck@...el.com
Subject: [PATCH 14/14] tracing: make a "compat_syscalls" tracing subsys

Create a new "compat_syscalls" subsys for tracing

Signed-off-by: Jason Baron <jbaron@...hat.com>
---
 include/linux/syscalls.h |   38 +++++++++++++++++++-------------------
 1 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 501cd46..94caf73 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -128,7 +128,7 @@ struct perf_event_attr;
 #define __SC_STR_TDECL5(t, a, ...)	#t, __SC_STR_TDECL4(__VA_ARGS__)
 #define __SC_STR_TDECL6(t, a, ...)	#t, __SC_STR_TDECL5(__VA_ARGS__)
 
-#define SYSCALL_TRACE_ENTER_EVENT(sname)				\
+#define SYSCALL_TRACE_ENTER_EVENT(sname, subsys)			\
 	static const struct syscall_metadata __syscall_meta_##sname;	\
 	static struct ftrace_event_call					\
 	__attribute__((__aligned__(4))) event_enter_##sname;		\
@@ -140,7 +140,7 @@ struct perf_event_attr;
 	  __attribute__((section("_ftrace_events")))			\
 	  event_enter_##sname = {					\
 		.name                   = "enter_"#sname,		\
-		.system                 = "syscalls",			\
+		.system                 = #subsys,			\
 		.event                  = &enter_syscall_print_##sname,	\
 		.raw_init		= init_syscall_trace,		\
 		.define_fields		= syscall_enter_define_fields,	\
@@ -150,7 +150,7 @@ struct perf_event_attr;
 		TRACE_SYS_ENTER_PROFILE_INIT				\
 	}
 
-#define SYSCALL_TRACE_EXIT_EVENT(sname)					\
+#define SYSCALL_TRACE_EXIT_EVENT(sname, subsys)			\
 	static const struct syscall_metadata __syscall_meta_##sname;	\
 	static struct ftrace_event_call					\
 	__attribute__((__aligned__(4))) event_exit_##sname;		\
@@ -162,7 +162,7 @@ struct perf_event_attr;
 	  __attribute__((section("_ftrace_events")))			\
 	  event_exit_##sname = {					\
 		.name                   = "exit_"#sname,		\
-		.system                 = "syscalls",			\
+		.system                 = #subsys,			\
 		.event                  = &exit_syscall_print_##sname,	\
 		.raw_init		= init_syscall_trace,		\
 		.define_fields		= syscall_exit_define_fields,	\
@@ -172,9 +172,9 @@ struct perf_event_attr;
 		TRACE_SYS_EXIT_PROFILE_INIT				\
 	}
 
-#define SYSCALL_METADATA(rname, sname, nb)			\
-	SYSCALL_TRACE_ENTER_EVENT(sname);			\
-	SYSCALL_TRACE_EXIT_EVENT(sname);			\
+#define SYSCALL_METADATA(rname, sname, nb, subsys)		\
+	SYSCALL_TRACE_ENTER_EVENT(sname, subsys);		\
+	SYSCALL_TRACE_EXIT_EVENT(sname, subsys);		\
 	static const struct syscall_metadata __used		\
 	  __attribute__((__aligned__(4)))			\
 	  __attribute__((section("__syscalls_metadata")))	\
@@ -192,8 +192,8 @@ struct perf_event_attr;
 	};
 
 #define SYSCALL_DEFINE0(sname)					\
-	SYSCALL_TRACE_ENTER_EVENT(sys_##sname);			\
-	SYSCALL_TRACE_EXIT_EVENT(sys_##sname);			\
+	SYSCALL_TRACE_ENTER_EVENT(sys_##sname, syscalls);	\
+	SYSCALL_TRACE_EXIT_EVENT(sys_##sname, syscalls);	\
 	static const struct syscall_metadata __used		\
 	  __attribute__((__aligned__(4)))			\
 	  __attribute__((section("__syscalls_metadata")))	\
@@ -236,17 +236,17 @@ struct perf_event_attr;
 #define COMPAT_SYSCALL_DEFINE6(name, ...) COMPAT_SYSCALL_DEFINEx(6, compat_sys_##name, name, __VA_ARGS__)
 
 #ifdef CONFIG_FTRACE_SYSCALLS
-#define COMPAT_SYSCALL_DEFINEx(x, syscall, sname, ...)		\
-	static const char *types_compat_sys_##sname[] = {	\
-		__SC_STR_TDECL##x(__VA_ARGS__)			\
-	};							\
-	static const char *args_compat_sys_##sname[] = {	\
-		__SC_STR_ADECL##x(__VA_ARGS__)			\
-	};							\
-	SYSCALL_METADATA(syscall, compat_sys_##sname, x);	\
+#define COMPAT_SYSCALL_DEFINEx(x, syscall, sname, ...)			\
+	static const char *types_compat_sys_##sname[] = {		\
+		__SC_STR_TDECL##x(__VA_ARGS__)				\
+	};								\
+	static const char *args_compat_sys_##sname[] = {		\
+		__SC_STR_ADECL##x(__VA_ARGS__)				\
+	};								\
+	SYSCALL_METADATA(syscall, compat_sys_##sname, x, compat_syscalls);\
 	asmlinkage long syscall(__SC_DECL##x(__VA_ARGS__))
 #else
-#define COMPAT_SYSCALL_DEFINEx(x, sname, ...)			\
+#define COMPAT_SYSCALL_DEFINEx(x, sname, ...)				\
 	asmlinkage long syscall(__SC_DECL##x(__VA_ARGS__))
 #endif
 
@@ -274,7 +274,7 @@ struct perf_event_attr;
 	static const char *args_sys##sname[] = {		\
 		__SC_STR_ADECL##x(__VA_ARGS__)			\
 	};							\
-	SYSCALL_METADATA(sys##sname, sys##sname, x);		\
+	SYSCALL_METADATA(sys##sname, sys##sname, x, syscalls);	\
 	__SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
 #else
 #define SYSCALL_DEFINEx(x, sname, ...)				\
-- 
1.6.5.1

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ