On 05/10/2023 16:17, Julien Grall wrote:
Hi Andrii,
Hi,
On 05/10/2023 14:30, Andrii Chepurnyi wrote:
For read operations, there's a potential issue when the data field
of the ioreq struct is partially updated in the response. To address
this, zero data field during read operations. This modification
serves as a safeguard against implementations that may inadvertently
partially update the data field in response to read requests.
For instance, consider an 8-bit read operation. In such cases, QEMU,
returns the same content of the data field with only 8 bits of
updated data. This behavior could potentially result in the
propagation of incorrect or unintended data to ioreq clients.
During a write access, the Device Model only need to know the content
of the bits associated with the access size (e.g. for 8-bit, the lower
8-bits). During a read access, the Device Model don't need to know any
value. So restrict the value it can access.
Signed-off-by: Andrii Chepurnyi <[email protected]>
Reviewed-by: Julien Grall <[email protected]>
Unless there are any objections, I will commit the patch tomorrow (Friday).
And now committed. Thanks!
I am not sure I would consider it for backport because the IOREQ is
still a tech preview on Arm. We should consider to switch to SUPPORT,
that said there is at least one bug that would need to be fixed first [1].
Cheers,
[1] [email protected]
--
Julien Grall