s390x/ipl: Add type and length checks for IplParameterBlock values
commit9946a9113cf5d84c9381342100343aa97f736ee0
authorAlexander Yarygin <yarygin@linux.vnet.ibm.com>
Mon, 10 Aug 2015 10:57:03 +0000 (10 13:57 +0300)
committerCornelia Huck <cornelia.huck@de.ibm.com>
Tue, 17 May 2016 13:50:29 +0000 (17 15:50 +0200)
tree42f6113e51f56e7c584d01c2bfc682e4f5aac873
parent04ca4b92ecb33703b03b8501bfb3d8b0c551e2e5
s390x/ipl: Add type and length checks for IplParameterBlock values

We can check for valid type and lengths of the IplParameterBlock fields
when receiving the struct from the guest.

Length of the IplParameterBlock can be less than 4K. To play safe we can
read and write only required amount of data.

Signed-off-by: Alexander Yarygin <yarygin@linux.vnet.ibm.com>
Reviewed-by: David Hildenband <dahi@linux.vnet.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
hw/s390x/ipl.h
target-s390x/misc_helper.c