diff options
| author | Dan Carpenter <[email protected]> | 2025-03-24 10:51:28 +0000 |
|---|---|---|
| committer | Sean Christopherson <[email protected]> | 2025-04-24 18:18:02 +0000 |
| commit | a476cadf8ef1fbb9780581316f0199dfc62a81f2 (patch) | |
| tree | 1143124a1b769ce217b9f09c829a733b9432d6b6 /drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |
| parent | KVM: SVM: Forcibly leave SMM mode on SHUTDOWN interception (diff) | |
| download | kernel-a476cadf8ef1fbb9780581316f0199dfc62a81f2.tar.gz kernel-a476cadf8ef1fbb9780581316f0199dfc62a81f2.zip | |
KVM: x86: Check that the high 32bits are clear in kvm_arch_vcpu_ioctl_run()
The "kvm_run->kvm_valid_regs" and "kvm_run->kvm_dirty_regs" variables are
u64 type. We are only using the lowest 3 bits but we want to ensure that
the users are not passing invalid bits so that we can use the remaining
bits in the future.
However "sync_valid_fields" and kvm_sync_valid_fields() are u32 type so
the check only ensures that the lower 32 bits are clear. Fix this by
changing the types to u64.
Fixes: 74c1807f6c4f ("KVM: x86: block KVM_CAP_SYNC_REGS if guest state is protected")
Signed-off-by: Dan Carpenter <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sean Christopherson <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c')
0 files changed, 0 insertions, 0 deletions
