Repository navigation
Conversation
The Windows TLS rewrite patches fs: accesses in place before the trampolines are written, so a framed entry that moved one failed the byte check and its stub copy was never rewritten.
Owner
|
Merged into AnyKyty as |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The red-zone framer could copy an
fs:/gs:access into a stub, either as the instructions a short prologue was widened over or inside a relocated leaf. On Windows the TLS rewrite then patches the original bytes in place before the trampolines are written, so the conversion stopped withAMD-only site bytes changed before patching, and the stub copy would have kept the unrewritten access. The framer now never moves a segment-relative access: such a function is skipped and reported like the other unframed cases.Tested
Windows 10 22H2, WinLibs GCC 15.2.0, LLVM 21.1.8.
red_zone_framer_testsgainsleavesSegmentRelativeAccessesInPlace, a leaf without pushes that starts withmov rax, fs:0and spills below rsp. It fails without the change and passes with it.red_zone_framer,red_zone_framer_executionandwindows_red_zone_rangespass.python tools/check_conventions.py --base origin/AnyKytyandtools/check_kyty_settings.py: passed.relinker --windows(red-zone framing on by default) converts Grand Theft Auto V (PPSA38500 01.002.001); before, it stopped at the function at0x15c00d0, which starts withmov rax, fs:0and stores at[rsp-0x4].tools/audit_dump.pyreports no stub or absent imports. The title then runs until kyty: bindless S#/T# loaded with s_buffer_load at a runtime offset stops resource tracking ("GetSamplerResource dword 0 is not a valid runtime value") #294.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)