diff options
| author | Sean Christopherson <[email protected]> | 2020-03-02 15:56:08 -0800 |
|---|---|---|
| committer | Paolo Bonzini <[email protected]> | 2020-03-16 17:57:57 +0100 |
| commit | 0fc62671876c29a80c16d41cbce782ff10795bef (patch) | |
| tree | dbd82c8956f872b326b101d1bbbfd75af3e26025 /tools/perf/scripts/python | |
| parent | d5a661d19df15cc618bb69e43cab3edb06d2021f (diff) | |
KVM: x86: Check userspace CPUID array size after validating sub-leaf
Verify that the next sub-leaf of CPUID 0x4 (or 0x8000001d) is valid
before rejecting the entire KVM_GET_SUPPORTED_CPUID due to insufficent
space in the userspace array.
Note, although this is technically a bug, it's not visible to userspace
as KVM_GET_SUPPORTED_CPUID is guaranteed to fail on KVM_CPUID_SIGNATURE,
which is hardcoded to be added after the affected leafs. The real
motivation for the change is to tightly couple the nent/maxnent and
do_host_cpuid() sequences in preparation for future cleanup.
Reviewed-by: Vitaly Kuznetsov <[email protected]>
Signed-off-by: Sean Christopherson <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions