Commit efff9dd
Marc Zyngier
KVM: arm64: Handle out-of-bound write to MDCR_EL2.HPMN
We don't really pay attention to what gets written to MDCR_EL2.HPMN,
and funky guests could play ugly games on us.
Restrict what gets written there, and limit the number of counters
to what the PMU is allowed to have.
Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Marc Zyngier <maz@kernel.org>1 parent cd84a42 commit efff9dd
1 file changed
+23
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2571 | 2571 | | |
2572 | 2572 | | |
2573 | 2573 | | |
2574 | | - | |
| 2574 | + | |
2575 | 2575 | | |
2576 | | - | |
2577 | | - | |
| 2576 | + | |
| 2577 | + | |
| 2578 | + | |
| 2579 | + | |
| 2580 | + | |
| 2581 | + | |
| 2582 | + | |
| 2583 | + | |
| 2584 | + | |
| 2585 | + | |
| 2586 | + | |
| 2587 | + | |
| 2588 | + | |
| 2589 | + | |
| 2590 | + | |
| 2591 | + | |
| 2592 | + | |
| 2593 | + | |
| 2594 | + | |
2578 | 2595 | | |
2579 | 2596 | | |
2580 | | - | |
2581 | | - | |
| 2597 | + | |
| 2598 | + | |
2582 | 2599 | | |
2583 | | - | |
| 2600 | + | |
2584 | 2601 | | |
2585 | 2602 | | |
2586 | 2603 | | |
| |||
0 commit comments