KVM: x86/pmu: annotate struct kvm_x86_pmu_event_filter with __counted_by()

struct kvm_x86_pmu_event_filter has a flexible array member, so annotate
it with the field that describes the amount of entries in such array.
Opportunistically replace the open-coded array size calculation with
flex_array_size() when copying the array portion of the struct from
userspace.

Signed-off-by: Carlos López <clopez@suse.de>
Link: https://patch.msgid.link/20260212140556.3883030-2-clopez@suse.de
Signed-off-by: Sean Christopherson <seanjc@google.com>
This commit is contained in:
Carlos López 2026-02-12 15:05:56 +01:00 • committed by Sean Christopherson
commit c522ac04ba
2 changed files with 2 additions and 2 deletions