Skip to content

feat(F-NSWINDOW-E5 r9): IAT name-based autobind + CMPXCHG 0F B0/B1 - #31

Merged
dancinlife merged 1 commit into
mainfrom
feat/e4-nswindow-e5-r9
Jun 26, 2026
Merged

feat(F-NSWINDOW-E5 r9): IAT name-based autobind + CMPXCHG 0F B0/B1#31
dancinlife merged 1 commit into
mainfrom
feat/e4-nswindow-e5-r9

Conversation

@dancinlife

@dancinlife dancinlife commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

F-NSWINDOW-E5 r9 — 실 PE를 첫 import 너머로

핵심: IAT name-based autobind

실 i386 PE의 IAT 슬롯을 합성 VA가 아니라 import 이름으로 native shim에 바인딩 → 실 PE가 자기 import를 해결하고 첫 import 너머로 실행 가능.

  • pe_parse.{c,h}: import_dir_rva/size (DataDirectory[1], PE32 + PE32+).
  • i386_cpu.c: i386_iat_autobind() — IMAGE_IMPORT_DESCRIPTOR→INT→IMAGE_IMPORT_BY_NAME walk + strcmp 매칭. 미매칭 → I386_HALT_UNBOUND_IMPORT + 이름 기록(정직·silent 아님).
  • i386_shim_entry_t(name+fn+arg_bytes) 레지스트리.

디코더: CMPXCHG 0F B0/B1 (enum 65/66)

C + byte-equal .hexa mirror(RUNEQ) + executor(alu_sub flags · 조건부 write-back 또는 EAX/AL 갱신 · ZF).

측정 (Run E 신설)

autobind: total=3 bound=3 unbound=0 · mini-run GetCurrentThreadId 슬롯 통과(halt=ret, EAX=0x1A2B) · CMPXCHG equal(ZF=1)/not-eq(ZF=0). Run A 25 checks green 유지. __SHIM_TEST__ PASS (-Wall -Wextra -std=c11). B/D 센티넬 0F B10F C1 C0(XADD = r10 gap).

own1

import 이름 바인딩 = 로딩(바이패스 아님) · 합성 PE/CMPXCHG = plain ops · Wine/DRM 0. validated_manjeom 여전히 0(로더 인프라 · 실 프레임은 r10 DX→Metal 브리지).

🤖 Generated with Claude Code


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

…coder+executor + Run E test

(1) i386_iat_autobind(): walks IMAGE_IMPORT_DESCRIPTOR → INT → IMAGE_IMPORT_BY_NAME,
matches each import name against the shim registry by strcmp — no pre-knowledge of slot
VAs needed. Unknown names produce fn=NULL entries (honest; run loop halts
UNBOUND_IMPORT with name in last_import). Header: i386_shim_entry_t typedef + decl.

(2) pe_parse: adds import_dir_rva/import_dir_size to pe_image_t; reads DataDirectory[1]
for both PE32 (opt-header offset 104) and PE32+ (offset 120).

(3) CMPXCHG decoder: 0F B0 (cmpxchg r/m8,r8) and 0F B1 (cmpxchg r/m32,r32) added to
i386_decode.c (enum ordinals 65/66) and byte-equal i386_decode.hexa mirror (RUNEQ).
Executor: compare EAX/AL with r/m; equal → ZF=1, r/m←reg; not-equal → ZF=0,
EAX/AL←r/m (Intel SDM Vol.2). Adds rm_set8/mem_write8 helpers.

(4) Run E: synthetic in-memory PE import directory (base 0x540000), autobind call,
18-point assertion suite — total=3, bound=3, unbound=0; mini-run through
GetCurrentThreadId slot verifies end-to-end dispatch (EAX=0x1A2B, halt=ret);
CMPXCHG equal + not-equal path tests. Run A (25 checks) stays green.
B/D wall sentinel updated 0F B1 → 0F C1 C0 (XADD, r10 gap).

own1: standard PE import resolution = LOADING (not bypass); Intel SDM CMPXCHG;
validated_manjeom STAYS 0. r10 target: DX→Metal bridge (lib/loader/dx_d3d11.hexa).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@dancinlife
dancinlife merged commit cecfcba into main Jun 26, 2026
1 check passed
@dancinlife
dancinlife deleted the feat/e4-nswindow-e5-r9 branch June 26, 2026 10:50
dancinlife pushed a commit that referenced this pull request Jun 26, 2026
…utobind 3/3+CMPXCHG. E4 거의완성·실 PE 첫 import 너머 실행 배선. 🧱 진짜 벽=DX→Metal 브리지(dx_d3d11.hexa=실 MTL 호출 0건). r10 표적=헤드리스 Metal 오프스크린 readback smoke 먼저 CI 검증(③게이트 실측증명)→이후 D3D11→Metal 배선. validated_manjeom 여전히 0.
dancinlife added a commit that referenced this pull request Jun 26, 2026
… SSOT (#32)

r9(#31) measured 결과를 blocking-frontiers 노드에 update-in-place 박제 —
실 PE IAT name-based autobind(이름으로 import↔shim 바인딩) + CMPXCHG 0F B0/B1.
다음 r10 표적 = DX→Metal 브리지(헤드리스 Metal 오프스크린 readback smoke 먼저 CI 검증).

Co-authored-by: dancinlife <mk55911@proton.me>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant