aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/syscalls.h
diff options
context:
space:
mode:
authorIan Munsie <imunsie@au1.ibm.com>2011-02-02 22:27:20 -0500
committerSteven Rostedt <rostedt@goodmis.org>2011-02-07 21:24:44 -0500
commitba976970c79fd2fbfe1a4b3b6766a318f4eb9d4c (patch)
tree3cb30bb45aa6302cce39849d281bba7e8e294c62 /include/linux/syscalls.h
parent075de90c46562de1435db16c2129ec4ff92e5bd2 (diff)
tracing/syscalls: Don't add events for unmapped syscalls
FTRACE_SYSCALLS would create events for each and every system call, even if it had failed to map the system call's name with it's number. This resulted in a number of events being created that would not behave as expected. This could happen, for example, on architectures who's symbol names are unusual and will not match the system call name. It could also happen with system calls which were mapped to sys_ni_syscall. This patch changes the default system call number in the metadata to -1. If the system call name from the metadata is not successfully mapped to a system call number during boot, than the event initialisation routine will now return an error, preventing the event from being created. Signed-off-by: Ian Munsie <imunsie@au1.ibm.com> LKML-Reference: <1296703645-18718-2-git-send-email-imunsie@au1.ibm.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include/linux/syscalls.h')
-rw-r--r--include/linux/syscalls.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 98664db1be47..8e8968e74544 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -158,6 +158,7 @@ extern struct trace_event_functions exit_syscall_print_funcs;
158 static struct syscall_metadata __used \ 158 static struct syscall_metadata __used \
159 __syscall_meta_##sname = { \ 159 __syscall_meta_##sname = { \
160 .name = "sys"#sname, \ 160 .name = "sys"#sname, \
161 .syscall_nr = -1, /* Filled in at boot */ \
161 .nb_args = nb, \ 162 .nb_args = nb, \
162 .types = types_##sname, \ 163 .types = types_##sname, \
163 .args = args_##sname, \ 164 .args = args_##sname, \
@@ -175,6 +176,7 @@ extern struct trace_event_functions exit_syscall_print_funcs;
175 static struct syscall_metadata __used \ 176 static struct syscall_metadata __used \
176 __syscall_meta__##sname = { \ 177 __syscall_meta__##sname = { \
177 .name = "sys_"#sname, \ 178 .name = "sys_"#sname, \
179 .syscall_nr = -1, /* Filled in at boot */ \
178 .nb_args = 0, \ 180 .nb_args = 0, \
179 .enter_event = &event_enter__##sname, \ 181 .enter_event = &event_enter__##sname, \
180 .exit_event = &event_exit__##sname, \ 182 .exit_event = &event_exit__##sname, \