1. 01 Mar, 2019 12 commits
  2. 28 Feb, 2019 6 commits
    • Tony Jones's avatar
      tools lib traceevent: Fix buffer overflow in arg_eval · 7c5b019e
      Tony Jones authored
      Fix buffer overflow observed when running perf test.
      
      The overflow is when trying to evaluate "1ULL << (64 - 1)" which is
      resulting in -9223372036854775808 which overflows the 20 character
      buffer.
      
      If is possible this bug has been reported before but I still don't see
      any fix checked in:
      
      See: https://www.spinics.net/lists/linux-perf-users/msg07714.htmlReported-by: default avatarMichael Sartain <mikesart@fastmail.com>
      Reported-by: default avatarMathias Krause <minipli@googlemail.com>
      Signed-off-by: default avatarTony Jones <tonyj@suse.de>
      Acked-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Fixes: f7d82350 ("tools/events: Add files to create libtraceevent.a")
      Link: http://lkml.kernel.org/r/20190228015532.8941-1-tonyj@suse.deSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      7c5b019e
    • Arnaldo Carvalho de Melo's avatar
      perf probe: Clarify error message about not finding kernel modules debuginfo · 4d6101f5
      Arnaldo Carvalho de Melo authored
      'perf probe' supports using just the kernel module name, but that will
      work only when the module is loaded, or using the full pathname to the
      file with the DWARF debug info, but the warning was cryptic:
      
      Before:
      
        # perf probe -m cls_flower -L fl_change
        Failed to find the path for cls_flower: No such file or directory
          Error: Failed to show lines.
        #
      
      After:
      
        # perf probe -m cls_flower -L fl_change
        Module cls_flower is not loaded, please specify its full path name.
          Error: Failed to show lines.
        # perf probe -m /lib/modules/5.0.0-rc7+/kernel/net/sched/cls_flower.ko -L fl_change | head -7
        <fl_change@/home/acme/git/linux/net/sched/cls_flower.c:0>
              0  static int fl_change(struct net *net, struct sk_buff *in_skb,
               		       struct tcf_proto *tp, unsigned long base,
               		       u32 handle, struct nlattr **tca,
               		       void **arg, bool ovr, struct netlink_ext_ack *extack)
              4  {
              5  	struct cls_fl_head *head = rtnl_dereference(tp->root);
        #
      
      The behaviour doesn't change when the module is loaded:
      
        # modprobe cls_flower
        # perf probe -m cls_flower -L fl_change | head -7
        <fl_change@/home/acme/git/linux/net/sched/cls_flower.c:0>
              0  static int fl_change(struct net *net, struct sk_buff *in_skb,
                                     struct tcf_proto *tp, unsigned long base,
                                     u32 handle, struct nlattr **tca,
                                     void **arg, bool ovr, struct netlink_ext_ack *extack)
              4  {
              5         struct cls_fl_head *head = rtnl_dereference(tp->root);
        #
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Marcelo Ricardo Leitner <mleitner@redhat.com>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lkml.kernel.org/n/tip-q4njvk9mshra00jacqjbzfn5@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      4d6101f5
    • Song Liu's avatar
      perf, bpf: Consider events with attr.bpf_event as side-band events · 21038f2b
      Song Liu authored
      Events with attr.bpf_event set should be considered as side-band events,
      as they carry information about BPF programs.
      Signed-off-by: default avatarSong Liu <songliubraving@fb.com>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: kernel-team@fb.com
      Cc: netdev@vger.kernel.org
      Fixes: 6ee52e2a ("perf, bpf: Introduce PERF_RECORD_BPF_EVENT")
      Link: http://lkml.kernel.org/r/20190226002019.3748539-2-songliubraving@fb.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      21038f2b
    • Ingo Molnar's avatar
      Merge tag 'perf-core-for-mingo-5.1-20190225' of... · c978b946
      Ingo Molnar authored
      Merge tag 'perf-core-for-mingo-5.1-20190225' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
      
      Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
      
      perf annotate:
      
        Wei Li:
      
        - Fix getting source line failure
      
      perf script:
      
        Andi Kleen:
      
        - Handle missing fields with -F +...
      
      perf data:
      
        Jiri Olsa:
      
        - Prep work to support per-cpu files in a directory.
      
      Intel PT:
      
        Adrian Hunter:
      
        - Improve thread_stack__no_call_return()
      
        - Hide x86 retpolines in thread stacks.
      
        - exported SQL viewer refactorings, new 'top calls' report..
      
        Alexander Shishkin:
      
        - Copy parent's address filter offsets on clone
      
        - Fix address filters for vmas with non-zero offset. Applies to
          ARM's CoreSight as well.
      
      python scripts:
      
        Tony Jones:
      
        - Python3 support for several 'perf script' python scripts.
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      c978b946
    • Ingo Molnar's avatar
      Merge tag 'perf-core-for-mingo-5.1-20190220' of... · 0a157124
      Ingo Molnar authored
      Merge tag 'perf-core-for-mingo-5.1-20190220' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
      
      Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
      
      perf report:
      
        He Kuang:
      
        - Don't shadow inlined symbol with different addr range.
      
      perf script:
      
        Jiri Olsa:
      
        - Allow +- operator to ask for -F to add/remove fields to
          the default set, for instance to ask for the removal of the
          'cpu' field in tracepoint events, adding 'period' to that
          kind of events, etc.
      
      perf test:
      
        Thomas Richter:
      
        - Fix scheduler tracepoint signedness of COMM fields failure of
          'evsel-tp-sched' test on s390 and other arches.
      
        Tommi Rantala:
      
        - Skip trace+probe_vfs_getname.sh when 'perf trace' is not built.
      
      perf trace:
      
        Arnaldo Carvalho de Melo:
      
        - Add initial BPF map dumper, initially just for the current, minimal
          needs of the augmented_raw_syscalls BPF example used to collect
          pointer args payloads that uses BPF maps for pid and syscall filtering,
          but will in time have features similar to 'perf stat' --interval-print,
          --interval-clear, ways to signal from a BPF event that a specific
          map (or range of that map) should be printed, optionally as a
          histogram, etc.
      
      General:
      
        Jiri Olsa:
      
        - Add CPU and NUMA topologies classes for further reuse, fixing some
          issues in the process.
      
        - Fixup some warnings and debug levels.
      
        - Make rm_rf() remove single file, not just directories.
      
      Documentation:
      
        Jonas Rabenstein:
      
        - Fix HEADER_CMDLINE description in perf.data documentation.
      
        - Fix documentation of the Flags section in perf.data.
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      0a157124
    • Ingo Molnar's avatar
      9ed8f1a6
  3. 25 Feb, 2019 22 commits