kallsyms: Do not display SyS_foo() syscall aliases in kallsyms

The SyS_foo() alias wrapper was added to make sure that system call
arguments were signed extended. The call itself is to never be used
by anything, only the sys_foo() version is. But this symbol is stored
in /proc/kallsyms, and is returned sometimes as the name of system
call functions when a ksym lookup is made, it confuses the function
tracer interface (see available_filter_functions in the tracefs
directory).

Al Viro even suggested that this should be removed from kallsyms
as well:

Link: http://lkml.kernel.org/r/20130510211716.GN25399@ZenIV.linux.org.uk

Modify the compile time kallsyms.c to check if the function name
begins with SyS_ and is before or after the same name that starts
with sys_ and if so, do not record it. This saves some space and
more importantly removes the confusing variations of the system
call name.

 wc kallsyms.*
  90151  284644 3819255 kallsyms.orig
  89826  283669 3808628 kallsyms.patched

 size vmlinux*
   text    data     bss     dec     hex filename
9990933 2368592 1249280 13608805         cfa765 vmlinux.orig
9986837 2368592 1249280 13604709         cf9765 vmlinux.patched

This patch only removes SyS_*, it does not do anything with
compat_SyS_*.

Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
1 file changed