diff options
| author | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-26 01:35:00 -0500 |
|---|---|---|
| committer | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-26 09:07:52 -0500 |
| commit | 11566729420056806c9187c5bbcfdde7a2575f2c (patch) | |
| tree | 1d153f649d76f0d74439a37b3a1c95ab911e5d7b /runtime/src/vulkan_aftermath.cpp | |
| parent | 2a491668a5afcb8bd1d9208d3b9ad0178df72e28 (diff) | |
rdna2spirv: --address-guard checks every heap_base access against the runtime's page table
Every Gen.host_addr access (buffer, global_, scalar and BVH loads, stores and atomics) calls one
%guard_fn with its sign-extended 48-bit heap offset, kind and span. Below the arena's size it passes
after a compare; elsewhere the 4 KiB pages of its first and last byte are looked up in a two-level
page table (level 1 by offset bits 47..32, level 2 one bit per page). A refused load reads the zero
area, a refused store or atomic the dump area (an atomic returns 0), and the refusal is counted in
the guard header. Without the header's magic every access passes; without the flag the module is
unchanged byte for byte.
tools/address_guard.py is the Python reference of the table and the check. cs_address_guard is the
fixture of the translator test and of scripts/run_address_guard_gpu_test.py, which runs it on a heap
where every address it touches is real memory, so no run can fault.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/vulkan_aftermath.cpp')
0 files changed, 0 insertions, 0 deletions