1. 08 Apr, 2010 1 commit
    • Frederic Weisbecker's avatar
      perf: Fix unsafe frame rewinding with hot regs fetching · ab285f2b
      Frederic Weisbecker authored
      When we fetch the hot regs and rewind to the nth caller, it
      might happen that we dereference a frame pointer outside the
      kernel stack boundaries, like in this example:
      
      	perf_trace_sched_switch+0xd5/0x120
              schedule+0x6b5/0x860
              retint_careful+0xd/0x21
      
      Since we directly dereference a userspace frame pointer here while
      rewinding behind retint_careful, this may end up in a crash.
      
      Fix this by simply using probe_kernel_address() when we rewind the
      frame pointer.
      
      This issue will have a much more proper fix in the next version of the
      perf_arch_fetch_caller_regs() API that will only need to rewind to the
      first caller.
      Reported-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Tested-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: David Miller <davem@davemloft.net>
      Cc: Archs <linux-arch@vger.kernel.org>
      ab285f2b
  2. 06 Apr, 2010 2 commits
    • Vince Weaver's avatar
      perf, x86: Enable Nehalem-EX support · 134fbadf
      Vince Weaver authored
      According to Intel Software Devel Manual Volume 3B, the
      Nehalem-EX PMU is just like regular Nehalem (except for the
      uncore support, which is completely different).
      Signed-off-by: default avatarVince Weaver <vweaver1@eecs.utk.edu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Cc: Lin Ming <ming.m.lin@intel.com>
      LKML-Reference: <alpine.DEB.2.00.1004060956580.1417@cl320.eecs.utk.edu>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      134fbadf
    • Arnaldo Carvalho de Melo's avatar
      perf kmem: Fix breakage introduced by 5a0e3ad6 slab.h script · 8c40041f
      Arnaldo Carvalho de Melo authored
      Commit 5a0e3ad6 ("include cleanup: Update gfp.h and slab.h
      includes to prepare for breaking implicit slab.h inclusion
      from percpu.h") added a '#include <linux/slab.h>' to
      tools/perf/builtin-kmem.h because: that tool has lines like
      this:
      
              if (!strcmp(event->name, "kmalloc") ||
                  !strcmp(event->name, "kmem_cache_alloc")) {
                      process_alloc_event(data, event, cpu, timestamp, thread, 0);
                      return;
              }
      
      So, using the script regex:
      
      >>> import re
      >>> s = re.compile(r'^(|.*[^a-zA-Z0-9_])_*(slab_is_available|kmem_cache_|k[mzc]alloc|krealloc|kz?free|ksize|__getname|putname)')
      >>> l = '   !strcmp(event->name, "kmem_cache_alloc")) {'
      >>> s.search(l)
      <_sre.SRE_Match object at 0xb77b1ad0>
      >>>
      
      Remove that file that is not available in the tools/perf include
      path and thus builtin-kmem.c couldn't be compiled.
      Reported-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Christoph Lameter <cl@linux-foundation.org>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      LKML-Reference: <1270561053-14308-1-git-send-email-acme@infradead.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      8c40041f
  3. 05 Apr, 2010 22 commits
  4. 04 Apr, 2010 7 commits
  5. 03 Apr, 2010 8 commits