aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2019-06-14 16:50:19 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-06-17 15:57:19 -0300
commit016f327ce48f9b0b1cdea729ba7080596113563f (patch)
tree361a20c6acb9dd4d7d524015dc152eddfef72663 /tools/perf/util
parentperf pmu: Fix uncore PMU alias list for ARM64 (diff)
downloadlinux-dev-016f327ce48f9b0b1cdea729ba7080596113563f.tar.xz
linux-dev-016f327ce48f9b0b1cdea729ba7080596113563f.zip
perf trace: Fixup pointer arithmetic when consuming augmented syscall args
We can't just add the consumed bytes to the arg->augmented.args member, as it is not void *, so it will access (consumed * sizeof(struct augmented_arg)) in the next augmented arg, totally wrong, cast the member to void pointe before adding the number of bytes consumed, duh. With this and hardcoding handling the 'renameat' and 'renameat2' syscalls in the tools/perf/examples/bpf/augmented_raw_syscalls.c eBPF proggie, we get: mv/24388 renameat2(AT_FDCWD, "/tmp/build/perf/util/.bpf-event.o.tmp", AT_FDCWD, "/tmp/build/perf/util/.bpf-event.o.cmd", RENAME_NOREPLACE) = 0 mv/24394 renameat2(AT_FDCWD, "/tmp/build/perf/util/.perf-hooks.o.tmp", AT_FDCWD, "/tmp/build/perf/util/.perf-hooks.o.cmd", RENAME_NOREPLACE) = 0 mv/24398 renameat2(AT_FDCWD, "/tmp/build/perf/util/.pmu-bison.o.tmp", AT_FDCWD, "/tmp/build/perf/util/.pmu-bison.o.cmd", RENAME_NOREPLACE) = 0 mv/24401 renameat2(AT_FDCWD, "/tmp/build/perf/util/.expr-bison.o.tmp", AT_FDCWD, "/tmp/build/perf/util/.expr-bison.o.cmd", RENAME_NOREPLACE) = 0 mv/24406 renameat2(AT_FDCWD, "/tmp/build/perf/util/.pmu.o.tmp", AT_FDCWD, "/tmp/build/perf/util/.pmu.o.cmd", RENAME_NOREPLACE) = 0 mv/24407 renameat2(AT_FDCWD, "/tmp/build/perf/util/.pmu-flex.o.tmp", AT_FDCWD, "/tmp/build/perf/util/.pmu-flex.o.cmd", RENAME_NOREPLACE) = 0 mv/24416 renameat2(AT_FDCWD, "/tmp/build/perf/util/.parse-events-flex.o.tmp", AT_FDCWD, "/tmp/build/perf/util/.parse-events-flex.o.cmd", RENAME_NOREPLACE) = 0 I.e. it works with two string args in the same syscall. Now back to taming the verifier... Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Brendan Gregg <brendan.d.gregg@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Fixes: 8195168e8779 ("perf trace: Consume the augmented_raw_syscalls payload") Link: https://lkml.kernel.org/n/tip-n1w59lpxks6m1le7fpo6rmyw@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util')
0 files changed, 0 insertions, 0 deletions