Re: [Qemu-devel] [PATCH] [m25p80] Abort in case we overrun the internal data buffer

2017-01-06 Thread Jean-Christophe DUBOIS
Le 06/01/2017 à 11:18, Peter Maydell a écrit : On 5 January 2017 at 21:39, Jean-Christophe DUBOIS wrote: So I think this behavior could be triggered either by buggy SPI controller emulator or by buggy guest software. And it seems hard to determine where the fault comes

Re: [Qemu-devel] [PATCH] [m25p80] Abort in case we overrun the internal data buffer

2017-01-06 Thread Peter Maydell
On 5 January 2017 at 21:39, Jean-Christophe DUBOIS wrote: > So I think this behavior could be triggered either by buggy SPI controller > emulator or by buggy guest software. And it seems hard to determine where > the fault comes from from within Qemu. Obviously if the fault

Re: [Qemu-devel] [PATCH] [m25p80] Abort in case we overrun the internal data buffer

2017-01-05 Thread Jean-Christophe DUBOIS
Le 05/01/2017 à 21:51, Peter Maydell a écrit : So what would be the preferred behavior? Asserting (and ending Qemu) Resetting (and hiding the misbehavior). If the guest can trigger this behaviour, then we should not assert or abort or otherwise cause QEMU to exit. The preferred behaviour is:

Re: [Qemu-devel] [PATCH] [m25p80] Abort in case we overrun the internal data buffer

2017-01-05 Thread Peter Maydell
On 5 January 2017 at 20:18, Jean-Christophe DUBOIS wrote: > Le 05/01/2017 à 21:04, mar.krzeminski a écrit : >> Peter Maydell wrote: >>> If these are "can't happen unless some other part of QEMU >>> is buggy" cases, then we can just assert(): >>> (If they're "could happen if

Re: [Qemu-devel] [PATCH] [m25p80] Abort in case we overrun the internal data buffer

2017-01-05 Thread Jean-Christophe DUBOIS
Le 05/01/2017 à 21:04, mar.krzeminski a écrit : Hi Peter, W dniu 05.01.2017 o 19:38, Peter Maydell pisze: On 3 January 2017 at 21:17, Jean-Christophe Dubois wrote: Signed-off-by: Jean-Christophe Dubois --- hw/block/m25p80.c | 19

Re: [Qemu-devel] [PATCH] [m25p80] Abort in case we overrun the internal data buffer

2017-01-05 Thread mar.krzeminski
Hi Peter, W dniu 05.01.2017 o 19:38, Peter Maydell pisze: On 3 January 2017 at 21:17, Jean-Christophe Dubois wrote: Signed-off-by: Jean-Christophe Dubois --- hw/block/m25p80.c | 19 +-- 1 file changed, 17 insertions(+), 2

Re: [Qemu-devel] [PATCH] [m25p80] Abort in case we overrun the internal data buffer

2017-01-05 Thread Peter Maydell
On 3 January 2017 at 21:17, Jean-Christophe Dubois wrote: > Signed-off-by: Jean-Christophe Dubois > --- > hw/block/m25p80.c | 19 +-- > 1 file changed, 17 insertions(+), 2 deletions(-) > > diff --git a/hw/block/m25p80.c

[Qemu-devel] [PATCH] [m25p80] Abort in case we overrun the internal data buffer

2017-01-03 Thread Jean-Christophe Dubois
Signed-off-by: Jean-Christophe Dubois --- hw/block/m25p80.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index d29ff4c..6c374cf 100644 --- a/hw/block/m25p80.c +++ b/hw/block/m25p80.c @@ -28,6