Re: [Qemu-devel] [PATCH 3/3] ppc/pnv: check size before data buffer access

2018-10-26 Thread P J P
+-- On Fri, 26 Oct 2018, Cédric Le Goater wrote --+ | On 10/25/18 8:45 AM, P J P wrote: | > - While we refactor the routine for better, a patch below seem okay to fix | >the OOB access issue? | | I think it is fine. Please add something like : | | qemu_log_mask(LOG_GUEST_ERROR, "ECC

Re: [Qemu-devel] [PATCH 3/3] ppc/pnv: check size before data buffer access

2018-10-26 Thread Cédric Le Goater
Hello Prasad, On 10/25/18 8:45 AM, P J P wrote: > Hello Cedric, > > +-- On Wed, 24 Oct 2018, Cédric Le Goater wrote --+ > | I think using a data[8] would be more appropriate. It would make the > | pnv_lpc_do_eccb() routine a little more complex. I tried to rewrite it to > | have a common one

Re: [Qemu-devel] [PATCH 3/3] ppc/pnv: check size before data buffer access

2018-10-24 Thread P J P
Hello Cedric, +-- On Wed, 24 Oct 2018, Cédric Le Goater wrote --+ | I think using a data[8] would be more appropriate. It would make the | pnv_lpc_do_eccb() routine a little more complex. I tried to rewrite it to | have a common one with the P9 LPC model but could not find a common pattern. |

Re: [Qemu-devel] [PATCH 3/3] ppc/pnv: check size before data buffer access

2018-10-24 Thread Cédric Le Goater
On 10/23/18 5:37 PM, David Gibson wrote: > On Mon, Oct 22, 2018 at 05:49:07PM +0530, P J P wrote: >> From: Prasad J Pandit >> >> While performing PowerNV memory r/w operations, the access length >> 'sz' could exceed the data[4] buffer size. Add check to avoid OOB >> access. >> >> Reported-by: Mogu

Re: [Qemu-devel] [PATCH 3/3] ppc/pnv: check size before data buffer access

2018-10-23 Thread David Gibson
On Mon, Oct 22, 2018 at 05:49:07PM +0530, P J P wrote: > From: Prasad J Pandit > > While performing PowerNV memory r/w operations, the access length > 'sz' could exceed the data[4] buffer size. Add check to avoid OOB > access. > > Reported-by: Moguofang > Signed-off-by: Prasad J Pandit So, it

[Qemu-devel] [PATCH 3/3] ppc/pnv: check size before data buffer access

2018-10-22 Thread P J P
From: Prasad J Pandit While performing PowerNV memory r/w operations, the access length 'sz' could exceed the data[4] buffer size. Add check to avoid OOB access. Reported-by: Moguofang Signed-off-by: Prasad J Pandit --- hw/ppc/pnv_lpc.c | 4 1 file changed, 4 insertions(+) diff --git a/