diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-08-06 17:28:12 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-08-06 17:28:12 -0700 |
commit | 592d8362bc2526bbb08cf7d258661691e957b5ea (patch) | |
tree | 9d4742c08163a5bcf17b043b8d602a79916f9cdd /kernel | |
parent | 24cb958695724ffb4488ef4f65892c0767bcd2f2 (diff) | |
parent | 99643bab36b642be10bf09cd3285c37c9e5b597f (diff) | |
download | linux-stable-592d8362bc2526bbb08cf7d258661691e957b5ea.tar.gz linux-stable-592d8362bc2526bbb08cf7d258661691e957b5ea.tar.bz2 linux-stable-592d8362bc2526bbb08cf7d258661691e957b5ea.zip |
Merge tag 'perf-urgent-2022-08-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fixes from Ingo Molnar:
"Misc fixes to kprobes and the faddr2line script, plus a cleanup"
* tag 'perf-urgent-2022-08-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
perf/core: Fix ';;' typo
scripts/faddr2line: Add CONFIG_DEBUG_INFO check
scripts/faddr2line: Fix vmlinux detection on arm64
x86/kprobes: Update kcb status flag after singlestepping
kprobes: Forbid probing on trampoline and BPF code areas
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/events/core.c | 2 | ||||
-rw-r--r-- | kernel/kprobes.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c index 4e718b93442b..2621fd24ad26 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -4457,7 +4457,7 @@ int perf_event_read_local(struct perf_event *event, u64 *value, *value = local64_read(&event->count); if (enabled || running) { - u64 __enabled, __running, __now;; + u64 __enabled, __running, __now; calc_timer_values(event, &__now, &__enabled, &__running); if (enabled) diff --git a/kernel/kprobes.c b/kernel/kprobes.c index f214f8c088ed..80697e5e03e4 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c @@ -1560,7 +1560,8 @@ static int check_kprobe_address_safe(struct kprobe *p, preempt_disable(); /* Ensure it is not in reserved area nor out of text */ - if (!kernel_text_address((unsigned long) p->addr) || + if (!(core_kernel_text((unsigned long) p->addr) || + is_module_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) || |