[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [RFC PATCH 1/9] spapr: fix off-by-one error
From: |
Sam Bobroff |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [RFC PATCH 1/9] spapr: fix off-by-one error in spapr_ovec_populate_dt() |
Date: |
Wed, 8 Feb 2017 09:53:36 +1100 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Tue, Feb 07, 2017 at 04:12:47PM -0600, Michael Roth wrote:
> Quoting Sam Bobroff (2017-02-06 20:56:44)
> > The last byte of the option vector was missing due to an off-by-one
> > error. Without this fix, client architecture support negotiation will
> > fail because the last byte of option vector 5, which contains the MMU
> > support, will be missed.
> >
> > Signed-off-by: Sam Bobroff <address@hidden>
> > ---
> > hw/ppc/spapr_ovec.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/hw/ppc/spapr_ovec.c b/hw/ppc/spapr_ovec.c
> > index 4f4c090a29..18dbc4a9ac 100644
> > --- a/hw/ppc/spapr_ovec.c
> > +++ b/hw/ppc/spapr_ovec.c
> > @@ -251,7 +251,7 @@ int spapr_ovec_populate_dt(void *fdt, int fdt_offset,
> > }
> > }
> >
> > - return fdt_setprop(fdt, fdt_offset, name, vec, vec_len);
> > + return fdt_setprop(fdt, fdt_offset, name, vec, vec_len + 1);
> > }
> >
> > void spapr_ovec_ruler(int width, sPAPROptionVector *ov)
> > --
> > 2.11.0
> >
>
> I noticed this working on another series and ended up with the same fix.
>
> The patch doesn't apply cleanly for me though due to the "spapr_ovec_ruler"
> reference. But, assuming that is unrelated to this series:
>
> Reviewed-by: Michael Roth <address@hidden>
You're corret, that line is unrelated.
Thanks!
Sam.
- [Qemu-ppc] [RFC PATCH 0/9] ISA 3.00 KVM guest support, Sam Bobroff, 2017/02/06
- [Qemu-ppc] [RFC PATCH 1/9] spapr: fix off-by-one error in spapr_ovec_populate_dt(), Sam Bobroff, 2017/02/06
- [Qemu-ppc] [RFC PATCH 4/9] target-ppc: support KVM_CAP_PPC_MMU_RADIX, KVM_CAP_PPC_MMU_HASH_V3, Sam Bobroff, 2017/02/06
- [Qemu-ppc] [RFC PATCH 3/9] spapr: Add ibm, processor-radix-AP-encodings to the device tree, Sam Bobroff, 2017/02/06
- [Qemu-ppc] [RFC PATCH 2/9] Update headers using update-linux-headers.sh, Sam Bobroff, 2017/02/06
- Re: [Qemu-ppc] [RFC PATCH 2/9] Update headers using update-linux-headers.sh, David Gibson, 2017/02/08