diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-06-21 10:56:05 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-06-21 10:56:05 +0200 |
commit | cfb0276373dfb5dccef0f60df0d1f7c0328918a7 (patch) | |
tree | 65c96cea2a3463baa2eb91351e5333ef44945fbd /arch/x86/kvm/lapic.c | |
parent | 04d72afa34edd14d99db7536d22819cdbb2b2e4c (diff) | |
parent | 13311e74253fe64329390df80bed3f07314ddd61 (diff) |
Merge tag 'v5.13-rc7' into usb-next
We need the USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/x86/kvm/lapic.c')
-rw-r--r-- | arch/x86/kvm/lapic.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index 6d72d8f43310..17fa4ab1b834 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c @@ -1410,6 +1410,9 @@ int kvm_lapic_reg_read(struct kvm_lapic *apic, u32 offset, int len, if (!apic_x2apic_mode(apic)) valid_reg_mask |= APIC_REG_MASK(APIC_ARBPRI); + if (alignment + len > 4) + return 1; + if (offset > 0x3f0 || !(valid_reg_mask & APIC_REG_MASK(offset))) return 1; |