Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 1 Mar 2015 19:56:13 +0000 (11:56 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 1 Mar 2015 19:56:13 +0000 (11:56 -0800)
Pull perf fixes from Ingo Molnar:
 "Two kprobes fixes and a handful of tooling fixes"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf tools: Make sparc64 arch point to sparc
  perf symbols: Define EM_AARCH64 for older OSes
  perf top: Fix SIGBUS on sparc64
  perf tools: Fix probing for PERF_FLAG_FD_CLOEXEC flag
  perf tools: Fix pthread_attr_setaffinity_np build error
  perf tools: Define _GNU_SOURCE on pthread_attr_setaffinity_np feature check
  perf bench: Fix order of arguments to memcpy_alloc_mem
  kprobes/x86: Check for invalid ftrace location in __recover_probed_insn()
  kprobes/x86: Use 5-byte NOP when the code might be modified by ftrace

1  2 
arch/x86/kernel/kprobes/opt.c

@@@ -259,6 -259,8 +259,8 @@@ static int can_optimize(unsigned long p
                         */
                        return 0;
                recovered_insn = recover_probed_instruction(buf, addr);
+               if (!recovered_insn)
+                       return 0;
                kernel_insn_init(&insn, (void *)recovered_insn, MAX_INSN_SIZE);
                insn_get_length(&insn);
                /* Another subsystem puts a breakpoint */
@@@ -322,8 -324,7 +324,8 @@@ void arch_remove_optimized_kprobe(struc
   * Target instructions MUST be relocatable (checked inside)
   * This is called when new aggr(opt)probe is allocated or reused.
   */
 -int arch_prepare_optimized_kprobe(struct optimized_kprobe *op)
 +int arch_prepare_optimized_kprobe(struct optimized_kprobe *op,
 +                                struct kprobe *__unused)
  {
        u8 *buf;
        int ret;