On 13.11.25 10:40, Stefano Garzarella wrote:
CCing David
Thanks
On Thu, Nov 13, 2025 at 11:58:42AM +0300, Daniil Tatianin wrote:
Just having a file descriptor is not enough to consider a memory region
public. If QEMU didn't map it as MAP_SHARED (in case of share=off), guest
writes to this region won't be visible to the vhost-user backend, thus
causing it to read all zeroes or garbage. Make sure we don't pass such
regions and include that to our definition of what a private region is.
Should we add a Fixes tag? Not really as bug fix, but more to make it
clear that this is a followup.
Fixes: 552b25229c ("vhost: Rework memslot filtering and fix "used_memslot"
tracking")
I am missing a description of what this problem is fixing.
The thing is that having real MAP_PRIVATE memory in such VM
configurations is usually a strong indication that it is a
VM-misconfiguration.
E.g., a vhost-user device cannot possibly read/write that memory.
So before we call something a fix (that was spelled out as a TODO), I
want to learn more about the valid sue case we have in mind here.
--
Cheers
David