[ http://tools.oasis-open.org/issues/browse/VIRTIO-35?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=35492#action_35492 ]
Rusty Russell commented on VIRTIO-35:
-------------------------------------
https://lists.oasis-open.org/archives/virtio/201310/msg00034.html
> race condition with multi-dword config accesses
> -----------------------------------------------
>
> Key: VIRTIO-35
> URL: http://tools.oasis-open.org/issues/browse/VIRTIO-35
> Project: OASIS Virtual I/O Device (VIRTIO) TC
> Issue Type: Bug
> Reporter: Michael Tsirkin
>
> on many architectures, accesses larger than 32 bit can not be atomic.
> Thus access to a device config field of >4 bytes is inherently racy
> in case field can change.
> For example, virtio-blk has
> u64 capacity;
> The following race can trigger:
> driver reads low 32 bit
> both low and high 32 bit change
> driver reads high 32 bit
> as a result, capacity observed is composed of
> old low bits and new high bits which does not
> make sense.
> For legacy devices, spec allowed byte by byte access,
> making the race even more common.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tools.oasis-open.org/issues/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira