GPUCORE-32592 Fix userbuf imports to respect RO memory
Fix the pinning stage of userbuf imports to correctly respect RO memory
for both CPU and GPU write access, not just GPU access.
Hence, a userbuf that is read-write at import time but then read-only at
map time (by munmap() and then mmap() a different mapping at exactly the
same address) will properly respect the read-only permissions.
In addition, ensure we mark the pages as dirty for both CPU writes as
well as GPU writes.
Bug: 210470189
Signed-off-by: Sean Callanan <spyffe@google.com>
Change-Id: I3eb899277705b82aa344355cd1d2cd5f343ccfff
1 file changed