]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm/arm64: vgic: Prevent userspace injection of a mapped interrupt
authorMarc Zyngier <marc.zyngier@arm.com>
Fri, 24 Jul 2015 10:30:43 +0000 (11:30 +0100)
committerMarc Zyngier <marc.zyngier@arm.com>
Wed, 12 Aug 2015 10:28:26 +0000 (11:28 +0100)
commit8d9d2fc3213708781b35c4f7a66a9a7bfbb09192
treea9d54841a4a92de76dad049bea4db351e7d35f5a
parent9157ca5bb90ef745c1ae651004f87d8ad18db687
KVM: arm/arm64: vgic: Prevent userspace injection of a mapped interrupt

Virtual interrupts mapped to a HW interrupt should only be triggered
from inside the kernel. Otherwise, you could end up confusing the
kernel (and the GIC's) state machine.

Rearrange the injection path so that kvm_vgic_inject_irq is
used for non-mapped interrupts, and kvm_vgic_inject_mapped_irq is
used for mapped interrupts. The latter should only be called from
inside the kernel (timer, irqfd).

Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
include/kvm/arm_vgic.h
virt/kvm/arm/vgic.c