spapr: Fail CAS if option vector table cannot be parsed
commitcbd0d7f36322ff8e2c9b625672ab1dafe0dc1712
authorGreg Kurz <groug@kaod.org>
Fri, 17 Jan 2020 09:15:52 +0000 (17 10:15 +0100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Sun, 2 Feb 2020 03:07:57 +0000 (2 14:07 +1100)
treeff376b22b77bb7a8ed1c76d302979af6eaabaf7d
parent6e0552a3a7d4e340a06372d79a27e4d89812d241
spapr: Fail CAS if option vector table cannot be parsed

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 and print a warning instead of aborting
QEMU.

Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <157925255250.397143.10855183619366882459.stgit@bahia.lan>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/spapr_hcall.c