Re: [PATCH] spapr: Fail CAS if option vector table cannot be parsed

2020-01-17 Thread Greg Kurz
On Fri, 17 Jan 2020 15:46:57 +1000 David Gibson wrote: > On Thu, Jan 16, 2020 at 04:34:06PM +0100, Philippe Mathieu-Daudé wrote: > > Hi Greg, > > > > On 1/16/20 4:05 PM, Greg Kurz wrote: > > > Most of the option vector helpers have assertions to check their > > > arguments aren't null. The guest

Re: [PATCH] spapr: Fail CAS if option vector table cannot be parsed

2020-01-16 Thread David Gibson
On Thu, Jan 16, 2020 at 04:34:06PM +0100, Philippe Mathieu-Daudé wrote: > Hi Greg, > > On 1/16/20 4:05 PM, Greg Kurz wrote: > > Most of the option vector helpers have assertions to check their > > arguments aren't null. The guest can provide an arbitrary address > > for the CAS structure that woul

Re: [PATCH] spapr: Fail CAS if option vector table cannot be parsed

2020-01-16 Thread Philippe Mathieu-Daudé
On 1/16/20 5:13 PM, Greg Kurz wrote: On Thu, 16 Jan 2020 16:34:06 +0100 Philippe Mathieu-Daudé wrote: Hi Greg, Hi Phil, On 1/16/20 4:05 PM, Greg Kurz wrote: Most of the option vector helpers have assertions to check their arguments aren't null. The guest can provide an arbitrary address

Re: [PATCH] spapr: Fail CAS if option vector table cannot be parsed

2020-01-16 Thread Greg Kurz
On Thu, 16 Jan 2020 16:34:06 +0100 Philippe Mathieu-Daudé wrote: > Hi Greg, > Hi Phil, > On 1/16/20 4:05 PM, Greg Kurz wrote: > > Most of the option vector helpers have assertions to check their > > arguments aren't null. The guest can provide an arbitrary address > > for the CAS structure tha

Re: [PATCH] spapr: Fail CAS if option vector table cannot be parsed

2020-01-16 Thread Philippe Mathieu-Daudé
Hi Greg, On 1/16/20 4:05 PM, Greg Kurz wrote: Most of the option vector helpers have assertions to check their arguments aren't null. The guest can provide an arbitrary address for the CAS structure that would result in such null arguments. Fail CAS with H_PARAMETER instead of aborting QEMU. Si

[PATCH] spapr: Fail CAS if option vector table cannot be parsed

2020-01-16 Thread Greg Kurz
Most of the option vector helpers have assertions to check their arguments aren't null. The guest can provide an arbitrary address for the CAS structure that would result in such null arguments. Fail CAS with H_PARAMETER instead of aborting QEMU. Signed-off-by: Greg Kurz --- hw/ppc/spapr_hcall.c