linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] perf/amd/ibs: Fix sample period computations
@ 2024-10-07  3:48 Ravi Bangoria
  2024-10-07  3:48 ` [PATCH 1/8] perf/amd/ibs: Remove IBS_{FETCH|OP}_CONFIG_MASK macros Ravi Bangoria
                   ` (8 more replies)
  0 siblings, 9 replies; 19+ messages in thread
From: Ravi Bangoria @ 2024-10-07  3:48 UTC (permalink / raw)
  To: peterz, mingo, namhyung
  Cc: ravi.bangoria, acme, eranian, mark.rutland, alexander.shishkin,
	jolsa, irogers, adrian.hunter, kan.liang, tglx, bp, dave.hansen,
	x86, hpa, linux-perf-users, linux-kernel, santosh.shukla,
	ananth.narayan, sandipan.das

IBS Fetch and IBS Op pmus have constraints on supported sample period
values. The IBS hw behavior could be undefined if they are not followed.
Currently, IBS driver does not honor them correctly and thus a malicious
event could cause issues to the system. Fortunately, the IBS hw is very
resilient so far and IBS pmus are restricted to root only, so the attack
vector is minimal. In any case, these are genuine bugs and must be fixed.

Patches are prepared on v6.11.

Ravi Bangoria (8):
  perf/amd/ibs: Remove IBS_{FETCH|OP}_CONFIG_MASK macros
  perf/amd/ibs: Remove pointless sample period check
  perf/amd/ibs: Fix ->config to sample period calculation for OP pmu
  perf/amd/ibs: Fix perf_ibs_op.cnt_mask for CurCnt
  perf/amd/ibs: Don't allow freq mode event creation through ->config
    interface
  perf/amd/ibs: Add pmu specific minimum period
  perf/amd/ibs: Add ->check_period() callback
  perf/core: Introduce pmu->adjust_period() callback

 arch/x86/events/amd/ibs.c         | 97 +++++++++++++++++++++++--------
 arch/x86/include/asm/perf_event.h |  1 +
 include/linux/perf_event.h        |  5 ++
 kernel/events/core.c              | 12 +++-
 4 files changed, 88 insertions(+), 27 deletions(-)

-- 
2.46.2


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2024-11-19 13:35 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-07  3:48 [PATCH 0/8] perf/amd/ibs: Fix sample period computations Ravi Bangoria
2024-10-07  3:48 ` [PATCH 1/8] perf/amd/ibs: Remove IBS_{FETCH|OP}_CONFIG_MASK macros Ravi Bangoria
2024-10-07  3:48 ` [PATCH 2/8] perf/amd/ibs: Remove pointless sample period check Ravi Bangoria
2024-10-07 19:16   ` Namhyung Kim
2024-10-07  3:48 ` [PATCH 3/8] perf/amd/ibs: Fix ->config to sample period calculation for OP pmu Ravi Bangoria
2024-10-07  3:48 ` [PATCH 4/8] perf/amd/ibs: Fix perf_ibs_op.cnt_mask for CurCnt Ravi Bangoria
2024-10-07  3:48 ` [PATCH 5/8] perf/amd/ibs: Don't allow freq mode event creation through ->config interface Ravi Bangoria
2024-10-07 19:24   ` Namhyung Kim
2024-10-08  5:30     ` Ravi Bangoria
2024-10-09  6:27       ` Namhyung Kim
2024-10-07  3:48 ` [PATCH 6/8] perf/amd/ibs: Add pmu specific minimum period Ravi Bangoria
2024-10-07 19:30   ` Namhyung Kim
2024-10-08  5:46     ` Ravi Bangoria
2024-10-09  6:32       ` Namhyung Kim
2024-10-07  3:48 ` [PATCH 7/8] perf/amd/ibs: Add ->check_period() callback Ravi Bangoria
2024-10-07 19:33   ` Namhyung Kim
2024-10-07  3:48 ` [PATCH 8/8] perf/core: Introduce pmu->adjust_period() callback Ravi Bangoria
2024-10-09  6:33 ` [PATCH 0/8] perf/amd/ibs: Fix sample period computations Namhyung Kim
2024-11-19 13:35   ` Ravi Bangoria

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).