Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'perf-urgent-2023-10-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 perf event fix from Ingo Molnar:
"Fix an LBR sampling bug"

* tag 'perf-urgent-2023-10-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
perf/x86/lbr: Filter vsyscall addresses

+3 -2
+3 -2
arch/x86/events/utils.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 #include <asm/insn.h> 3 + #include <linux/mm.h> 3 4 4 5 #include "perf_event.h" 5 6 ··· 133 132 * The LBR logs any address in the IP, even if the IP just 134 133 * faulted. This means userspace can control the from address. 135 134 * Ensure we don't blindly read any address by validating it is 136 - * a known text address. 135 + * a known text address and not a vsyscall address. 137 136 */ 138 - if (kernel_text_address(from)) { 137 + if (kernel_text_address(from) && !in_gate_area_no_mm(from)) { 139 138 addr = (void *)from; 140 139 /* 141 140 * Assume we can get the maximum possible size