Skip to content

Commit ae07f55

Browse files
Ian Munsierostedt
authored andcommitted
tracing/syscalls: Early terminate search for sys_ni_syscall
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 <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Steven Rostedt <[email protected]>
1 parent b2d5549 commit ae07f55

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

kernel/trace/trace_syscalls.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ find_syscall_meta(unsigned long syscall)
8585
stop = __stop_syscalls_metadata;
8686
kallsyms_lookup(syscall, NULL, NULL, NULL, str);
8787

88+
if (arch_syscall_match_sym_name(str, "sys_ni_syscall"))
89+
return NULL;
90+
8891
for ( ; start < stop; start++) {
8992
if ((*start)->name && arch_syscall_match_sym_name(str, (*start)->name))
9093
return *start;

0 commit comments

Comments
 (0)