diff options
author | Sean Christopherson <[email protected]> | 2024-03-19 17:15:41 -0700 |
---|---|---|
committer | Sean Christopherson <[email protected]> | 2024-04-08 13:20:24 -0700 |
commit | 5c9ca4ed890889a2b7c300c4f63f3baf3f63383f (patch) | |
tree | a7a1b880d823624a478b3454c562cb13104d65fd /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 18f06e97692516d28c3cdc577fb5c501d690b303 (diff) |
KVM: Check validity of offset+length of gfn_to_pfn_cache prior to activation
When activating a gfn_to_pfn_cache, verify that the offset+length is sane
and usable before marking the cache active. Letting __kvm_gpc_refresh()
detect the problem results in a cache being marked active without setting
the GPA (or any other fields), which in turn results in KVM trying to
refresh a cache with INVALID_GPA.
Attempting to refresh a cache with INVALID_GPA isn't functionally
problematic, but it runs afoul of the sanity check that exactly one of
GPA or userspace HVA is valid, i.e. that a cache is either GPA-based or
HVA-based.
Reported-by: [email protected]
Closes: https://lore.kernel.org/all/[email protected]
Fixes: 721f5b0dda78 ("KVM: pfncache: allow a cache to be activated with a fixed (userspace) HVA")
Cc: David Woodhouse <[email protected]>
Cc: Paul Durrant <[email protected]>
Reviewed-by: Paul Durrant <[email protected]>
Reviewed-by: David Woodhouse <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sean Christopherson <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions