public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Alexander Graf <agraf@suse.de>, Avi Kivity <avi@redhat.com>
Cc: Scott Wood <scottwood@freescale.com>,
	kvm-ppc@vger.kernel.org, KVM list <kvm@vger.kernel.org>
Subject: Re: [PATCH 1/2] KVM: PPC: e500: fix allocation size error on g2h_tlb1_map
Date: Thu, 27 Sep 2012 13:03:34 -0300	[thread overview]
Message-ID: <20120927160334.GB21897@amt.cnet> (raw)
In-Reply-To: <993278D9-C731-4D08-AD3D-C7CCBC59D9D4@suse.de>

On Tue, Sep 25, 2012 at 09:46:01AM +0200, Alexander Graf wrote:
> 
> On 23.08.2012, at 03:04, Scott Wood wrote:
> 
> > We were only allocating half the bytes we need, which was made more
> > obvious by a recent fix to the memset in  clear_tlb1_bitmap().
> > 
> > Signed-off-by: Scott Wood <scottwood@freescale.com>
> 
> Thanks, applied to kvm-ppc-next.
> 
> Avi, Marcelo, this one should get applied to anything currently -stable as it essentially means we could overrun an array that has been allocated too small. How do we do this?
> 
> 
> Alex

Apparently Avi prefers that patches are sent directly to the -stable
tree.

Avi?

> 
> > ---
> > arch/powerpc/kvm/e500_tlb.c |    2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/arch/powerpc/kvm/e500_tlb.c b/arch/powerpc/kvm/e500_tlb.c
> > index 43489a8..a27d134 100644
> > --- a/arch/powerpc/kvm/e500_tlb.c
> > +++ b/arch/powerpc/kvm/e500_tlb.c
> > @@ -1385,7 +1385,7 @@ int kvmppc_e500_tlb_init(struct kvmppc_vcpu_e500 *vcpu_e500)
> > 	if (!vcpu_e500->gtlb_priv[1])
> > 		goto err;
> > 
> > -	vcpu_e500->g2h_tlb1_map = kzalloc(sizeof(unsigned int) *
> > +	vcpu_e500->g2h_tlb1_map = kzalloc(sizeof(u64) *
> > 					  vcpu_e500->gtlb_params[1].entries,
> > 					  GFP_KERNEL);
> > 	if (!vcpu_e500->g2h_tlb1_map)
> > -- 
> > 1.7.9.5
> > 
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2012-09-27 16:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-23  1:04 [PATCH 1/2] KVM: PPC: e500: fix allocation size error on g2h_tlb1_map Scott Wood
2012-08-23  1:04 ` [PATCH 2/2] KVM: PPC: e500: MMU API: fix leak of shared_tlb_pages Scott Wood
2012-09-25  7:46   ` Alexander Graf
2012-09-25  7:46 ` [PATCH 1/2] KVM: PPC: e500: fix allocation size error on g2h_tlb1_map Alexander Graf
2012-09-27 16:03   ` Marcelo Tosatti [this message]
2012-09-27 16:35     ` Avi Kivity
2012-09-27 19:59       ` Alexander Graf
2012-09-30 11:29         ` Avi Kivity
2012-10-01 10:59           ` Alexander Graf
2012-10-02 10:22             ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120927160334.GB21897@amt.cnet \
    --to=mtosatti@redhat.com \
    --cc=agraf@suse.de \
    --cc=avi@redhat.com \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=scottwood@freescale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox