Commit f4b4b45
Peter Zijlstra
perf/x86: Fix out of bound MSR access
On Wed, Jul 28, 2021 at 12:49:43PM -0400, Vince Weaver wrote:
> [32694.087403] unchecked MSR access error: WRMSR to 0x318 (tried to write 0x0000000000000000) at rIP: 0xffffffff8106f854 (native_write_msr+0x4/0x20)
> [32694.101374] Call Trace:
> [32694.103974] perf_clear_dirty_counters+0x86/0x100
The problem being that it doesn't filter out all fake counters, in
specific the above (erroneously) tries to use FIXED_BTS. Limit the
fixed counters indexes to the hardware supplied number.
Reported-by: Vince Weaver <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Tested-by: Vince Weaver <[email protected]>
Tested-by: Like Xu <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]1 parent b068fc0 commit f4b4b45
1 file changed
+7
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2489 | 2489 | | |
2490 | 2490 | | |
2491 | 2491 | | |
2492 | | - | |
2493 | | - | |
2494 | | - | |
2495 | | - | |
| 2492 | + | |
| 2493 | + | |
| 2494 | + | |
| 2495 | + | |
| 2496 | + | |
2496 | 2497 | | |
2497 | | - | |
| 2498 | + | |
2498 | 2499 | | |
| 2500 | + | |
2499 | 2501 | | |
2500 | 2502 | | |
2501 | 2503 | | |
| |||
0 commit comments