diff options
| author | Fuad Tabba <fuad.tabba@linux.dev> | 2026-08-25 09:59:45 +0100 |
|---|---|---|
| committer | Oliver Upton <oupton@kernel.org> | 2026-09-15 15:09:56 -0700 |
| commit | 2a2eb10795a1e495aebc7f829ccecb72c05b4fd9 (patch) | |
| tree | c01e3f29d7c83ff3d31732aa37c5d7471910d5f1 /tools/perf/scripts/python | |
| parent | 4c74e233cdedd11592775fae2a6243e67ca3f891 (diff) | |
| download | linux-next-2a2eb10795a1e495aebc7f829ccecb72c05b4fd9.tar.gz linux-next-2a2eb10795a1e495aebc7f829ccecb72c05b4fd9.zip | |
KVM: arm64: Validate the SVE vector length in pkvm_vcpu_init_sve()
pkvm_vcpu_init_sve() clamps only the upper bound of the host-provided
sve_max_vl, so an invalid vector length reaches sve_state_size_from_vl()
and the WARN_ON() there, which is fatal at EL2. The existing
!sve_state_size test rejects such a length, but only after the macro has
run.
Check sve_vl_valid() before deriving the state size. A valid length
cannot yield a zero size, so the !sve_state_size test goes with it.
Fixes: 5db1bef93342 ("KVM: arm64: Track SVE state in the hypervisor vcpu structure")
Reported-by: Stefan Teodorescu <fane@google.com>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Fuad Tabba <fuad.tabba@linux.dev>
Link: https://patch.msgid.link/20260825085948.1674721-2-fuad.tabba@linux.dev
Signed-off-by: Oliver Upton <oupton@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
