> -----Original Message-----
> From: Xen-devel <[email protected]> On Behalf Of 
> Oleksandr Tyshchenko
> Sent: 12 January 2021 21:52
> To: [email protected]
> Cc: Oleksandr Tyshchenko <[email protected]>; Paul Durrant 
> <[email protected]>; Julien Grall
> <[email protected]>; Stefano Stabellini <[email protected]>; Julien Grall 
> <[email protected]>
> Subject: [PATCH V4 13/24] xen/ioreq: Use guest_cmpxchg64() instead of 
> cmpxchg()
> 
> From: Oleksandr Tyshchenko <[email protected]>
> 
> The cmpxchg() in ioreq_send_buffered() operates on memory shared
> with the emulator domain (and the target domain if the legacy
> interface is used).
> 
> In order to be on the safe side we need to switch
> to guest_cmpxchg64() to prevent a domain to DoS Xen on Arm.
> 
> As there is no plan to support the legacy interface on Arm,
> we will have a page to be mapped in a single domain at the time,
> so we can use s->emulator in guest_cmpxchg64() safely.
> 
> Thankfully the only user of the legacy interface is x86 so far
> and there is not concern regarding the atomics operations.
> 
> Please note, that the legacy interface *must* not be used on Arm
> without revisiting the code.
> 
> Signed-off-by: Oleksandr Tyshchenko <[email protected]>
> Acked-by: Stefano Stabellini <[email protected]>
> CC: Julien Grall <[email protected]>
> [On Arm only]
> Tested-by: Wei Chen <[email protected]>

Reviewed-by: Paul Durrant <[email protected]>


Reply via email to