]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
perf augmented_raw_syscalls: Support copying two string syscall args
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 16 Jul 2019 17:55:57 +0000 (14:55 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 29 Jul 2019 21:34:41 +0000 (18:34 -0300)
commit8d5da2649d8211e63c5f65ccf8945f2c46a9c0b8
treeb253336f074c366aae78cf9f01da18c2b4f3a1e5
parentbf134ca6c8eafd7ddc28840f767259b97e950bac
perf augmented_raw_syscalls: Support copying two string syscall args

Starting with the renameat and renameat2 syscall, that both receive as
second and fourth parameters a pathname:

  # perf trace -e rename* mv one ANOTHER
  LLVM: dumping /home/acme/git/perf/tools/perf/examples/bpf/augmented_raw_syscalls.o
  mv: cannot stat 'one': No such file or directory
  renameat2(AT_FDCWD, "one", AT_FDCWD, "ANOTHER", RENAME_NOREPLACE) = -1 ENOENT (No such file or directory)
  #

Since the per CPU scratch buffer map has space for two maximum sized
pathnames, the verifier is satisfied that there will be no overrun.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-x2uboyg5kx2wqeru288209b6@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-trace.c
tools/perf/examples/bpf/augmented_raw_syscalls.c