]> Git Repo - J-linux.git/commitdiff
Merge tag 'locking-urgent-2021-07-11' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <[email protected]>
Sun, 11 Jul 2021 18:06:09 +0000 (11:06 -0700)
committerLinus Torvalds <[email protected]>
Sun, 11 Jul 2021 18:06:09 +0000 (11:06 -0700)
Pull locking fixes from Ingo Molnar:

 - Fix a Sparc crash

 - Fix a number of objtool warnings

 - Fix /proc/lockdep output on certain configs

 - Restore a kprobes fail-safe

* tag 'locking-urgent-2021-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  locking/atomic: sparc: Fix arch_cmpxchg64_local()
  kprobe/static_call: Restore missing static_call_text_reserved()
  static_call: Fix static_call_text_reserved() vs __init
  jump_label: Fix jump_label_text_reserved() vs __init
  locking/lockdep: Fix meaningless /proc/lockdep output of lock classes on !CONFIG_PROVE_LOCKING

1  2 
kernel/kprobes.c

diff --combined kernel/kprobes.c
index 471b1d18a92fc17e5df6a63122dbeb6a260d8fce,069388d26e3ce0c46d88411e0f363d740bdaccd7..790a573bbe00c6f6b2afd27dc8fac862d222ec9b
@@@ -35,6 -35,7 +35,7 @@@
  #include <linux/ftrace.h>
  #include <linux/cpu.h>
  #include <linux/jump_label.h>
+ #include <linux/static_call.h>
  #include <linux/perf_event.h>
  
  #include <asm/sections.h>
@@@ -106,7 -107,7 +107,7 @@@ void __weak *alloc_insn_page(void
        return module_alloc(PAGE_SIZE);
  }
  
 -void __weak free_insn_page(void *page)
 +static void free_insn_page(void *page)
  {
        module_memfree(page);
  }
@@@ -321,21 -322,11 +322,21 @@@ int kprobe_cache_get_kallsym(struct kpr
  }
  
  #ifdef CONFIG_OPTPROBES
 +void __weak *alloc_optinsn_page(void)
 +{
 +      return alloc_insn_page();
 +}
 +
 +void __weak free_optinsn_page(void *page)
 +{
 +      free_insn_page(page);
 +}
 +
  /* For optimized_kprobe buffer */
  struct kprobe_insn_cache kprobe_optinsn_slots = {
        .mutex = __MUTEX_INITIALIZER(kprobe_optinsn_slots.mutex),
 -      .alloc = alloc_insn_page,
 -      .free = free_insn_page,
 +      .alloc = alloc_optinsn_page,
 +      .free = free_optinsn_page,
        .sym = KPROBE_OPTINSN_PAGE_SYM,
        .pages = LIST_HEAD_INIT(kprobe_optinsn_slots.pages),
        /* .insn_size is initialized later */
@@@ -1561,6 -1552,7 +1562,7 @@@ static int check_kprobe_address_safe(st
        if (!kernel_text_address((unsigned long) p->addr) ||
            within_kprobe_blacklist((unsigned long) p->addr) ||
            jump_label_text_reserved(p->addr, p->addr) ||
+           static_call_text_reserved(p->addr, p->addr) ||
            find_bug((unsigned long)p->addr)) {
                ret = -EINVAL;
                goto out;
This page took 0.058117 seconds and 4 git commands to generate.