mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
s390/sclp: read sccb from mem based on provided length
The header contained within the SCCB passed to the SCLP service call contains the actual length of the SCCB. Instead of allocating a static 4K size for the work sccb, let's allow for a variable size determined by the value in the header. The proper checks are already in place to ensure the SCCB length is sufficent to store a full response and that the length does not cross any explicitly-set boundaries. Signed-off-by: Collin Walling <walling@linux.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Message-Id: <20200915194416.107460-4-walling@linux.ibm.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
This commit is contained in:
parent
db13387ca0
commit
c1db53a591
3 changed files with 33 additions and 26 deletions
|
@ -213,7 +213,7 @@ static uint16_t handle_sccb_read_events(SCLPEventFacility *ef, SCCB *sccb,
|
|||
|
||||
event_buf = &red->ebh;
|
||||
event_buf->length = 0;
|
||||
slen = sizeof(sccb->data);
|
||||
slen = sccb_data_len(sccb);
|
||||
|
||||
rc = SCLP_RC_NO_EVENT_BUFFERS_STORED;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue