diff options
| author | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-24 22:03:36 -0500 |
|---|---|---|
| committer | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-24 22:03:36 -0500 |
| commit | 9f82f136f68a84bafa745ff61eb6eebb01128654 (patch) | |
| tree | b7d6c631ff91421f25e830a93cd37e0187cb0141 /runtime/src/main.cpp | |
| parent | 599fe9f2212e1004f93b33a199e19146cf53d7d8 (diff) | |
d3d12: pin the pages of a live host import
RADV checks the pages of a VK_EXT_external_memory_host import again at
every submission, and once one of them is read-only the kernel rejects
that submission and every later one. The slot-133 shadow trackers and the
geometry watch make copied title pages read-only to see the next write,
and a page can be both under a shadow and under a live import.
A new leonida::kernel_writes::hold pins a range until release() and opens
it. Unlike begin_write it records the pin when no opener is set yet (no
tracker exists), so a tracker made later passes over the pages too;
ShadowPages and the geometry watch already pass over pinned pages. The
slot-133 import (create_host_buffer) and the console descriptor heap
import take the pin before vkAllocateMemory, so no guard lands between
the writability check and the import, and end it on every path that
frees the memory: a declined or failed import and the release.
The finding and the design are NateWeav's (coordination issue #14,
comments 7141859164 and 7142359977); this implements their description.
As in their tree the pin is unconditional; a driver gate is not done.
Tests: kernel_writes_test checks hold and release on the pin set (no
opener, with an opener, alongside a file read's pin). d3d12_title_va_test
in its imports-on mode makes a shadow over pages, checks that its tracker
guards them, then imports the same pages and checks that two submissions
leave them writable, that the pin ends with the import and that the
tracker guards them again afterwards.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/main.cpp')
0 files changed, 0 insertions, 0 deletions