David Gibson 0f888bfadd spapr_vty: lookup should only return valid VTY objects
If a guest passes the reg property of a valid VIO object that is not a VTY
to either H_GET_TERM_CHAR or H_PUT_TERM_CHAR, QEMU hits a dynamic cast
assertion and aborts.

PAPR+ says "Hypervisor checks the termno parameter for validity against the
Vterm IOA unit addresses assigned to the partition, else return H_Parameter."

This patch adds a type check to ensure vty_lookup() either returns a pointer
to a valid VTY object or NULL.  H_GET_TERM_CHAR and H_PUT_TERM_CHAR will
now return H_PARAMETER to the guest instead of crashing.

The patch has no effect on the reg == 0 hack used to implement the RTAS call
display-character.

Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
2015-07-07 17:44:53 +02:00
2015-06-24 16:33:42 +01:00
2015-06-22 17:40:01 +02:00
2015-07-06 18:39:59 +02:00
2015-06-22 17:40:01 +02:00
2015-06-22 17:40:01 +02:00
2015-06-12 06:42:34 +02:00
2015-07-02 10:06:23 +01:00
2015-06-03 14:21:24 +03:00
2015-06-22 17:40:01 +02:00
2015-06-12 13:42:17 +01:00
2015-07-07 09:22:40 +01:00
2015-06-26 15:57:43 +01:00
2015-06-23 20:23:39 +03:00
2015-06-03 14:21:24 +03:00
2015-06-15 13:24:51 +01:00
2015-06-11 10:13:28 +01:00
2015-06-22 18:20:40 +02:00
2015-06-23 17:46:20 +01:00

Read the documentation in qemu-doc.html or on http://wiki.qemu-project.org

- QEMU team
Description
No description provided
Readme 404 MiB
Languages
C 82.6%
C++ 6.5%
Python 3.4%
Dylan 2.9%
Shell 1.6%
Other 2.8%