1. 24 Jul, 2018 4 commits
    • Alexey Budankov's avatar
      perf tests: Check that complex event name is parsed correctly · 06dc5bf2
      Alexey Budankov authored
      Extend regression testing to cover case of complex event names enabled
      by the cset f92da712 ("perf record: Enable arbitrary event names
      thru name= modifier").
      
      Testing it:
      
        # perf test
         1: vmlinux symtab matches kallsyms                       : Skip
         2: Detect openat syscall event                           : Ok
         3: Detect openat syscall event on all cpus               : Ok
         4: Read samples using the mmap interface                 : Ok
         5: Test data source output                               : Ok
         6: Parse event definition strings                        : Ok		<===!
         7: Simple expression parser                              : Ok
      ...
      
      Committer testing:
      
        # perf test "event definition"
         6: Parse event definition strings                        : Ok
        # perf test -v 6 2> /tmp/before
        # perf test -v 6 2> /tmp/after
        # diff -u /tmp/before /tmp/after
        --- /tmp/before	2018-06-19 10:50:21.485572638 -0300
        +++ /tmp/after	2018-06-19 10:50:40.886572896 -0300
        @@ -1,6 +1,6 @@
          6: Parse event definition strings                        :
         --- start ---
        -test child forked, pid 24259
        +test child forked, pid 24904
         running test 0 'syscalls:sys_enter_openat'Using CPUID GenuineIntel-6-3D
         registering plugin: /root/.traceevent/plugins/plugin_kvm.so
         registering plugin: /root/.traceevent/plugins/plugin_hrtimer.so
        @@ -136,9 +136,11 @@
         running test 50 '4:0x6530160/name=numpmu/'
         running test 51 'L1-dcache-misses/name=cachepmu/'
         running test 52 'intel_pt//u'
        +running test 53 'cycles/name='COMPLEX_CYCLES_NAME:orig=cycles,desc=chip-clock-ticks'/Duk'
         running test 0 'cpu/config=10,config1,config2=3,period=1000/u'
         running test 1 'cpu/config=1,name=krava/u,cpu/config=2/u'
         running test 2 'cpu/config=1,call-graph=fp,time,period=100000/,cpu/config=2,call-graph=no,time=0,period=2000/'
        +running test 3 'cpu/name='COMPLEX_CYCLES_NAME:orig=cycles,desc=chip-clock-ticks',period=0x1,event=0x2,umask=0x3/ukp'
         el-capacity -> cpu/event=0x54,umask=0x2/
         el-conflict -> cpu/event=0x54,umask=0x1/
         el-start -> cpu/event=0xc8,umask=0x1/
        #
      Signed-off-by: default avatarAlexey Budankov <alexey.budankov@linux.intel.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/ad30b774-219b-7b80-c610-4e9e298cf8a7@linux.intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      06dc5bf2
    • Arnaldo Carvalho de Melo's avatar
      1d59d16e
    • Ananth N Mavinakayanahalli's avatar
      MAINTAINERS: Add Naveen N. Rao as kprobes co-maintainer · 4799f685
      Ananth N Mavinakayanahalli authored
      Naveen has been contributing consistently reviewing and hardening
      kprobes for some time now. I have not been able to do the same due
      to other commitments.
      Signed-off-by: default avatarAnanth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
      Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: akpm@linux-foundation.org
      Cc: mhiramat@kernel.org
      Link: http://lkml.kernel.org/r/153180735790.1914.15547706781664285286.stgit@thinktuxSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      4799f685
    • Thomas Gleixner's avatar
      perf/x86/amd/ibs: Don't access non-started event · d2753e6b
      Thomas Gleixner authored
      Paul Menzel reported the following bug:
      
      > Enabling the undefined behavior sanitizer and building GNU/Linux 4.18-rc5+
      > (with some unrelated commits) with GCC 8.1.0 from Debian Sid/unstable, the
      > warning below is shown.
      >
      > > [    2.111913]
      > > ================================================================================
      > > [    2.111917] UBSAN: Undefined behaviour in arch/x86/events/amd/ibs.c:582:24
      > > [    2.111919] member access within null pointer of type 'struct perf_event'
      > > [    2.111926] CPU: 0 PID: 144 Comm: udevadm Not tainted 4.18.0-rc5-00316-g4864b68cedf2 #104
      > > [    2.111928] Hardware name: ASROCK E350M1/E350M1, BIOS TIMELESS 01/01/1970
      > > [    2.111930] Call Trace:
      > > [    2.111943]  dump_stack+0x55/0x89
      > > [    2.111949]  ubsan_epilogue+0xb/0x33
      > > [    2.111953]  handle_null_ptr_deref+0x7f/0x90
      > > [    2.111958]  __ubsan_handle_type_mismatch_v1+0x55/0x60
      > > [    2.111964]  perf_ibs_handle_irq+0x596/0x620
      
      The code dereferences event before checking the STARTED bit. Patch
      below should cure the issue.
      
      The warning should not trigger, if I analyzed the thing correctly.
      (And Paul's testing confirms this.)
      Reported-by: default avatarPaul Menzel <pmenzel@molgen.mpg.de>
      Tested-by: default avatarPaul Menzel <pmenzel@molgen.mpg.de>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Paul Menzel <pmenzel+linux-x86@molgen.mpg.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Link: http://lkml.kernel.org/r/alpine.DEB.2.21.1807200958390.1580@nanos.tec.linutronix.deSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      d2753e6b
  2. 22 Jul, 2018 8 commits
  3. 21 Jul, 2018 12 commits
  4. 20 Jul, 2018 16 commits