]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 9 Jul 2017 17:49:47 +0000 (10:49 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 9 Jul 2017 17:49:47 +0000 (10:49 -0700)
Pull perf fixes from Thomas Gleixner:
 "A couple of fixes for perf and kprobes:

   - Add he missing exclude_kernel attribute for the precise_ip level so
     !CAP_SYS_ADMIN users get the proper results.

   - Warn instead of failing completely when perf has no unwind support
     for a particular architectiure built in.

   - Ensure that jprobes are at function entry and not at some random
     place"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  kprobes: Ensure that jprobe probepoints are at function entry
  kprobes: Simplify register_jprobes()
  kprobes: Rename [arch_]function_offset_within_entry() to [arch_]kprobe_on_func_entry()
  perf unwind: Do not fail due to missing unwind support
  perf evsel: Set attr.exclude_kernel when probing max attr.precise_ip

1  2 
arch/powerpc/kernel/kprobes.c

index 45f1ff721c3273a93fd3fb47ecc30e139b03111d,586508e949f0ef677b1f1d2878ce3a48536a47a0..367494dc67d9e89a34ae7273b737479349987aef
@@@ -164,13 -164,17 +164,13 @@@ NOKPROBE_SYMBOL(arch_prepare_kprobe)
  
  void arch_arm_kprobe(struct kprobe *p)
  {
 -      *p->addr = BREAKPOINT_INSTRUCTION;
 -      flush_icache_range((unsigned long) p->addr,
 -                         (unsigned long) p->addr + sizeof(kprobe_opcode_t));
 +      patch_instruction(p->addr, BREAKPOINT_INSTRUCTION);
  }
  NOKPROBE_SYMBOL(arch_arm_kprobe);
  
  void arch_disarm_kprobe(struct kprobe *p)
  {
 -      *p->addr = p->opcode;
 -      flush_icache_range((unsigned long) p->addr,
 -                         (unsigned long) p->addr + sizeof(kprobe_opcode_t));
 +      patch_instruction(p->addr, p->opcode);
  }
  NOKPROBE_SYMBOL(arch_disarm_kprobe);
  
@@@ -217,7 -221,7 +217,7 @@@ static nokprobe_inline void set_current
        kcb->kprobe_saved_msr = regs->msr;
  }
  
- bool arch_function_offset_within_entry(unsigned long offset)
+ bool arch_kprobe_on_func_entry(unsigned long offset)
  {
  #ifdef PPC64_ELF_ABI_v2
  #ifdef CONFIG_KPROBES_ON_FTRACE