Jiri Slaby changed bug 1177113
What Removed Added
Status NEW IN_PROGRESS
CC   jslaby@suse.com
Assignee kernel-bugs@opensuse.org jslaby@suse.com

Comment # 1 on bug 1177113 from
Of course:
> #0  strlen () at ../sysdeps/arm/armv6t2/strlen.S:126
> #1  0xb6800780 in __vfprintf_internal (s=0xbeff9908, s@entry=0xbeff9900, format=0xa27160 "]: %s()", ap=..., mode_flags=<optimized out>)
>     at vfprintf-internal.c:1688
> #2  0xb68012f8 in buffered_vfprintf (s=s@entry=0xb690bab8 <_IO_2_1_stderr_>, format=format@entry=0xa27160 "]: %s()", args=...,
>     mode_flags=mode_flags@entry=2) at vfprintf-internal.c:2377
> #3  0xb67fed60 in __vfprintf_internal (s=0xb690bab8 <_IO_2_1_stderr_>, format=0xa27160 "]: %s()", format@entry=0xbeffc3d4 "@mV", ap=..., ap@entry=...,
>     mode_flags=2) at vfprintf-internal.c:1346
> #4  0xb689f1ec in ___fprintf_chk (fp=<optimized out>, flag=flag@entry=1, format=<optimized out>) at fprintf_chk.c:33
> #5  0x0056ecdc in fprintf (__fmt=0xa27160 "]: %s()", __stream=<optimized out>) at /usr/include/bits/stdio2.h:100
> #6  trace__sys_exit (trace=trace@entry=0xbeffc710, evsel=evsel@entry=0xd968d0, event=<optimized out>, sample=sample@entry=0xbeffc3e8)
>     at builtin-trace.c:2475
> #7  0x00566d40 in trace__handle_event (sample=0xbeffc3e8, event=<optimized out>, trace=0xbeffc710) at builtin-trace.c:3122
> #8  __trace__deliver_event (trace=trace@entry=0xbeffc710, event=<optimized out>) at builtin-trace.c:3705
> #9  0x005742f0 in trace__deliver_event (event=<optimized out>, trace=0xbeffc710) at builtin-trace.c:3732
> #10 trace__run (argv=<optimized out>, argc=<optimized out>, trace=0xbeffc710) at builtin-trace.c:4079
> #11 cmd_trace (argc=<optimized out>, argv=<optimized out>) at builtin-trace.c:5134
> #12 0x005b53bc in run_builtin (argv=0xbefff6e8, argc=2, p=0xcad068 <commands+288>) at perf.c:312
> #13 handle_internal_command (argc=2, argv=0xbefff6e8) at perf.c:364
> #14 0x0050a6e0 in run_argv (argv=<synthetic pointer>, argcp=<synthetic pointer>) at perf.c:538
> #15 main (argc=2, argv=0xbefff6e8) at perf.c:538

I suspect:
commit d21cb73a9025ffa9ef4f5a0d4051780c264fa02e
Author: Arnaldo Carvalho de Melo <acme@redhat.com>
Date:   Thu May 28 17:21:29 2020 -0300

    perf trace: Grow the syscall table as needed when using libaudit

as it does not memset the last id here:
> struct syscall *table = realloc(trace->syscalls.table, (id + 1) * sizeof(*sc));
>
> if (table == NULL)
>         return -ENOMEM;
>
> memset(table + trace->sctbl->syscalls.max_id, 0, (id - trace->sctbl->syscalls.max_id) * sizeof(*sc));

And sc contains uninitialised mess:
(gdb) p *sc
$18 = {tp_format = 0x1affffe5, nr_args = -451178428, args_size = -515177508,
bpf_prog = {sys_enter = 0xe51b4030, sys_exit = 0xe51bc040}, 
  is_exit = true, is_open = 16, nonexistent = 84, args = 0xe2664020, name =
0xe001100c <error: Cannot access memory at address 0xe001100c>, 
  fmt = 0xe51bc034, arg_fmt = 0xe0cc5000}


You are receiving this mail because: