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-2025-03-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 perf events fixes from Ingo Molnar:
"Two fixes: an RAPL PMU driver error handling fix, and an AMD IBS
software filter fix"

* tag 'perf-urgent-2025-03-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
perf/x86/rapl: Fix error handling in init_rapl_pmus()
perf/x86: Check data address for IBS software filter

+12 -5
+6 -4
arch/x86/events/amd/ibs.c
··· 1128 1128 regs.flags |= PERF_EFLAGS_EXACT; 1129 1129 } 1130 1130 1131 + if (perf_ibs == &perf_ibs_op) 1132 + perf_ibs_parse_ld_st_data(event->attr.sample_type, &ibs_data, &data); 1133 + 1131 1134 if ((event->attr.config2 & IBS_SW_FILTER_MASK) && 1132 - perf_exclude_event(event, &regs)) { 1135 + (perf_exclude_event(event, &regs) || 1136 + ((data.sample_flags & PERF_SAMPLE_ADDR) && 1137 + event->attr.exclude_kernel && kernel_ip(data.addr)))) { 1133 1138 throttle = perf_event_account_interrupt(event); 1134 1139 goto out; 1135 1140 } ··· 1148 1143 }; 1149 1144 perf_sample_save_raw_data(&data, event, &raw); 1150 1145 } 1151 - 1152 - if (perf_ibs == &perf_ibs_op) 1153 - perf_ibs_parse_ld_st_data(event->attr.sample_type, &ibs_data, &data); 1154 1146 1155 1147 /* 1156 1148 * rip recorded by IbsOpRip will not be consistent with rsp and rbp
+6 -1
arch/x86/events/rapl.c
··· 730 730 { 731 731 int nr_rapl_pmu = topology_max_packages(); 732 732 struct rapl_pmus *rapl_pmus; 733 + int ret; 733 734 734 735 /* 735 736 * rapl_pmu_scope must be either PKG, DIE or CORE ··· 762 761 rapl_pmus->pmu.module = THIS_MODULE; 763 762 rapl_pmus->pmu.capabilities = PERF_PMU_CAP_NO_EXCLUDE; 764 763 765 - return init_rapl_pmu(rapl_pmus); 764 + ret = init_rapl_pmu(rapl_pmus); 765 + if (ret) 766 + kfree(rapl_pmus); 767 + 768 + return ret; 766 769 } 767 770 768 771 static struct rapl_model model_snb = {