upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/pe_loader.cpp
diff options
context:
space:
mode:
authorTyrannys <80750971+Tyrannys@users.noreply.github.com>2026-11-24 01:40:07 -0600
committerTyrannys <80750971+Tyrannys@users.noreply.github.com>2026-11-24 01:50:32 -0600
commit779f901084774418f1f83d55c6d7fa075e71e98b (patch)
tree62e0fa043dafc99298230db3d3007e6507a9c819 /runtime/src/pe_loader.cpp
parent42987826128a8612f4e01d8c2beaf0ff2814410c (diff)
fs, dstorage: a ReadFile into first-touch title memory commits the pages and reads again (RT-READFILE-NOACCESS)
xmem maps the title's physical pages as views of a reserve-only section and commits each page in a vectored handler when user-mode code first faults on it. A kernel write raises no such fault: ReadFile into a page nobody touched yet fails with ERROR_NOACCESS (998). The retail title's file reader treats any error but 6, 0x26 and 0x57 as transient and calls Sleep(1) and ReadFile again forever, so the boot never leaves its first frame loop; DirectStorage reads into the same memory came back as E_DSTORAGE_ACCESS_VIOLATION and the title stopped on an int3. The ReadFile import of the file shims, and DirectStorage's read_file_range, now read one byte of every page of the destination from user mode on ERROR_NOACCESS (the handler commits them) and read again once. file_system_test checks it on a reserve-only section with a first-touch handler: the host ReadFile fails with ERROR_NOACCESS, the shimmed one reads every byte. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/pe_loader.cpp')
0 files changed, 0 insertions, 0 deletions