Patch "arm/arm64: KVM: Fix set_clear_sgi_pend_reg offset" has been added to the 3.14-stable tree
This is a note to let you know that I've just added the patch titled
arm/arm64: KVM: Fix set_clear_sgi_pend_reg offset
to the 3.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
arm-arm64-kvm-fix-set_clear_sgi_pend_reg-offset.patch
and it can be found in the queue-3.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
0fea6d7628ed6e25a9ee1b67edf7c859718d39e8Mon Sep 17 00:00:00 2001
From: Christoffer Dall <[email protected]>
Date: Thu, 25 Sep 2014 18:41:07 +0200
Subject: arm/arm64: KVM: Fix set_clear_sgi_pend_reg offset
From: Christoffer Dall <[email protected]>
commit 0fea6d7628ed6e25a9ee1b67edf7c859718d39e8 upstream.
The sgi values calculated in read_set_clear_sgi_pend_reg() and write_set_clear_sgi_pend_reg() were horribly incorrectly multiplied by 4 with catastrophic results in that subfunctions ended up overwriting memory not allocated for the expected purpose.
This showed up as bugs in kfree() and the kernel complaining a lot of you turn on memory debugging.
This addresses: http://marc.info/?l=kvm&m=141164910007868&w=2
--- virt/kvm/arm/vgic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
virt/kvm/arm/vgic.c +2 -2
@@ -674,7 +674,7 @@ static bool read_set_clear_sgi_pend_reg( {struct vgic_dist *dist = &vcpu->kvm->arch.vgic;int sgi; -int min_sgi = (offset & ~0x3 ) *4 ; +int min_sgi = (offset & ~0x3 );int max_sgi = min_sgi +3 ;int vcpu_id = vcpu->vcpu_id;u32 reg =0 ;
@@ -695,7 +695,7 @@ static bool write_set_clear_sgi_pend_reg {struct vgic_dist *dist = &vcpu->kvm->arch.vgic;int sgi; -int min_sgi = (offset & ~0x3 ) *4 ; +int min_sgi = (offset & ~0x3 );int max_sgi = min_sgi +3 ;int vcpu_id = vcpu->vcpu_id;u32 reg;
Patches currently in stable-queue which might be from [email protected] are
queue-3.14/arm-arm64-kvm-fix-set_clear_sgi_pend_reg-offset.patch queue-3.14/arm-arm64-kvm-fix-use-of-wnr-bit-in-kvm_is_write_fault.patch queue-3.14/kvm-arm-vgic-plug-irq-injection-race.patch