Prev: [PATCH 35/40] trace syscalls, PPC: Convert PPC syscalls without long return types
Next: [PATCH 34/40] trace syscalls: Convert generic syscalls without long return type
From: Ian Munsie on 23 Jun 2010 06:10 From: Ian Munsie <imunsie(a)au1.ibm.com> Many system calls are unimplemented and mapped to sys_ni_syscall, but at boot ftrace would still search through every syscall metadata entry for a match which wouldn't be there. This patch adds causes the search to terminate early if the system call is not mapped. Signed-off-by: Ian Munsie <imunsie(a)au1.ibm.com> --- kernel/trace/trace_syscalls.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c index 264441e..58ef002 100644 --- a/kernel/trace/trace_syscalls.c +++ b/kernel/trace/trace_syscalls.c @@ -95,6 +95,9 @@ static struct syscall_metadata *find_syscall_meta(unsigned long syscall) stop = (struct syscall_metadata *)__stop_syscalls_metadata; kallsyms_lookup(syscall, NULL, NULL, NULL, str); + if (arch_syscall_match_sym_name(str, "sys_ni_syscall")) + return NULL; + for ( ; start < stop; start++) { if (start->name && arch_syscall_match_sym_name(str, start->name)) return start; -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |