]> git.ipfire.org Git - people/arne_f/kernel.git/commit
KVM: arm/arm64: vgic: Avoid injecting reserved IRQ numbers
authorMarc Zyngier <marc.zyngier@arm.com>
Wed, 17 Jun 2015 13:43:35 +0000 (14:43 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Jul 2015 16:49:37 +0000 (09:49 -0700)
commitda75b45af7778af80c7c1d9853868e9bb4b75065
treeac609ab43e64264a837e9a4f703f697333435449
parentaae3d9fecc22c1c7565c94f0818704a1908543ce
KVM: arm/arm64: vgic: Avoid injecting reserved IRQ numbers

commit 4839ddc27b7212ec58874f62c97da7400c8523be upstream.

Commit fd1d0ddf2ae9 (KVM: arm/arm64: check IRQ number on userland
injection) rightly limited the range of interrupts userspace can
inject in a guest, but failed to consider the (unlikely) case where
a guest is configured with 1024 interrupts.

In this case, interrupts ranging from 1020 to 1023 are unuseable,
as they have a special meaning for the GIC CPU interface.

Make sure that these number cannot be used as an IRQ. Also delete
a redundant (and similarily buggy) check in kvm_set_irq.

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Cc: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
virt/kvm/arm/vgic.c