[Patch v2 0/9] perf/x86: Miscellaneous PMU bug fixes
From: Dapeng Mi
Date: Tue Jun 09 2026 - 01:07:55 EST
This series groups several independent PMU fixes to simplify review and
backporting.
Changes:
v1 -> v2:
- Fallback to software branch type decoding if hardware decoding is not
suppprted (Sashiko patch 4/9).
- Drop kernel IP for PERF_SAMPLE_IP if exclude_kernel attribute is
required (Sashiko, patch 8/9).
- Add kernel access check when kernel callchains are requested
(Sashiko, patch 9/9)
- Address Zide and Thomas's comments.
- Collect Reviewed-bys.
Patch layout:
- Patch 1/9: Fix anythread_deprecated being overwritten issue.
- Patches 2-3/9: Fix the issue that cap_user_rdpmc is not updated
correctly.
- Patch 4/9: Fallback to software branch type decoding if no hardware
decoding.
- Patch 5/9: Fix a kernel address leakage issue in LBR stack.
- Patch 6/9: Fix the issue that the return value of
intel_pmu_init_hybrid() is not valiated correctly.
- Patch 7/9: Fix a "unchecked MSR access error" on PEBS_ENABLE MSR.
- Patch 8/9: Prevent a theoretical kernel register data leak in sampling.
- Patch 9/9: Add kernel access check when kernel callchains are
requested.
History:
v1: https://lore.kernel.org/all/20260605011136.2043393-1-dapeng1.mi@xxxxxxxxxxxxxxx/
Dapeng Mi (8):
perf/x86/intel: Remove anythread_deprecated bit from perf_capabilities
perf/x86: Update cap_user_rdpmc base on rdpmc user disable state
perf/x86/intel: Fallback to sw branch type decoding if no hw decoding
perf/x86/intel: Drop LBR entries whose privilege level mismatches
br_sel
perf/x86/intel: Validate return value of intel_pmu_init_hybrid()
perf/x86/intel: Drop fixed-counter PEBS constraints for baseline PEBS
perf/core: Fix kernel register info leak via hardware skid
perf/core: Check kernel access when kernel callchains are requested
Ian Rogers (1):
perf/x86: Introduce is_x86_pmu() helper
arch/x86/events/core.c | 19 +++-------------
arch/x86/events/intel/core.c | 43 ++++++++++++++++++++++++------------
arch/x86/events/intel/ds.c | 13 -----------
arch/x86/events/intel/lbr.c | 15 ++++++++++---
arch/x86/events/perf_event.h | 25 +++++++++++++++++----
kernel/events/core.c | 41 +++++++++++++++++++++++++++-------
6 files changed, 98 insertions(+), 58 deletions(-)
--
2.34.1