Keep index within boundaries in kvmppc_44x_emul_tlbwe()
Subsystems (3)
An index of KVM44x_GUEST_TLB_SIZE is already one too large.
Signed-off-by Roel Kluin <[email protected]>
--- arch/powerpc/kvm/44x_tlb.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/powerpc/kvm/44x_tlb.c +1 -1
@@ -440,7 +440,7 @@ int kvmppc_44x_emul_tlbwe(struct kvm_vcpu *vcpu, u8 ra, u8 rs, u8 ws)unsigned int gtlb_index; gtlb_index =kvmppc_get_gpr (vcpu, ra); -if (gtlb_index > KVM44x_GUEST_TLB_SIZE) { +if (gtlb_index >= KVM44x_GUEST_TLB_SIZE) {printk ("%s: index %d\n" , __func__, gtlb_index);kvmppc_dump_vcpu (vcpu);return EMULATE_FAIL ;
Quoted 2 lines · Roel Kluin
An index of
KVM44x_GUEST_TLB_SIZEis already one too large.
Thanks for this one Roel. Please try to keep kvm@vger CC'ed on KVM patches, as all KVM patches go through kvm.git.
Hollis, I'd like to see an Ack from you on this patch. It looks reasonable to me, but I'd still feel better if there was some word from you on it.
Alex
Hollis Blanchard
Acked-byQuoted 3 lines · Roel Kluin
An index of
KVM44x_GUEST_TLB_SIZEis already one too large.Signed-off-by Roel Kluin <[email protected]>
Acked-by Hollis Blanchard <[email protected]>
Thanks Roel.
-Hollis
Alexander Graf
Acked-byQuoted 6 lines · Hollis Blanchard
Quoted 3 lines · Roel Kluin
An index of
KVM44x_GUEST_TLB_SIZEis already one too large.Signed-off-by Roel Kluin <[email protected]>Acked-by Hollis Blanchard <[email protected]>
Acked-by Alexander Graf <[email protected]>
Alex
Marcelo Tosatti
AppliedQuoted 11 lines · Alexander Graf
Quoted 6 lines · Hollis Blanchard
Quoted 3 lines · Roel Kluin
An index of
KVM44x_GUEST_TLB_SIZEis already one too large.Signed-off-by Roel Kluin <[email protected]>Acked-by Hollis Blanchard <[email protected]>Acked-by Alexander Graf <[email protected]>
Applied, thanks.