[PR #2631] [CLOSED] feat(ghidra): admit bounded ARM/ARM64 PE targets on Windows P0 #5292

Closed
opened 2026-10-31 01:05:30 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/2631
Author: @WestLabsAI
Created: 10/13/2026
Status: ❌ Closed

Base: main ← Head: feat/windows-p0-arm-pe


📝 Commits (9)

  • 2ba5040 feat(ghidra): admit bounded ARM/ARM64 PE targets on Windows P0
  • add1719 test(ghidra): add source-built ARM64 PE fixtures for Windows P0
  • da3e2e8 fix(ghidra): preserve ARM64 fixture returns and scope verification claims
  • 2eeac79 docs(ghidra): correct Windows ARM fixture verification scope
  • fd71b1f chore(ghidra): reconcile ARM prototype with captured Windows scope
  • 8d48fb8 fix(ghidra): reject conflicting Windows verifier selectors
  • 4fffda8 chore: merge current main into PR #2631
  • ff21fee Merge branch 'main' into feat/windows-p0-arm-pe
  • ffea1d8 Merge origin/main into feat/windows-p0-arm-pe

📊 Changes

11 files changed (+168 additions, -76 deletions)

View changed files

📝 docs/ghidra-provider.md (+5 -2)
📝 docs/installation.md (+1 -1)
📝 docs/managed-code-analysis.md (+5 -4)
📝 docs/native-investigation.md (+1 -1)
📝 docs/testing.md (+10 -10)
📝 docs/windows-ghidra-p0.md (+14 -3)
📝 scripts/create-ghidra-windows-fixture.mjs (+53 -25)
📝 scripts/verify-real-ghidra-windows.mjs (+43 -13)
📝 src/ghidra/GhidraProvider.behavior.test.ts (+27 -14)
📝 src/ghidra/GhidraProvider.ts (+4 -2)
📝 src/ghidra/GhidraProviderCapabilities.ts (+5 -1)

📄 Description

What

Extend the Windows Ghidra P0 admission boundary to accept native ARM and
ARM64 PE
applications and DLLs, alongside the existing x86 / x86-64 lane.

Addresses morluto/rea#2186 and the scope review there.

Why

inspectWindowsP0TargetSupport currently rejects every non-x86 target, while the
general (non-Windows) provider already treats arm/arm64 as first-class
architectures (SUPPORTED_ARCHITECTURES). The refusal is a P0 policy gate, not an
engine limitation — Ghidra analyses ARM PE/firmware fine on Windows with the
P0-documented toolchain (Ghidra 12.1.4 + JDK 21).

Scope (bounded)

  • Admit native, non-managed ARM/ARM64 PE applications and DLLs only. Every other
    P0 constraint is unchanged: PE-only, application/shared-library role,
    native/non-managed, NTFS path admission, read-only operation set, no DB mutation.
  • For PE, Ghidra's own PE loader selects the language from the machine field
    (ARMNT → ARM:LE:32:v8 Thumb; ARM64/ARM64EC → AARCH64:LE:64:v8A), so no
    raw-binary language mapping is needed here.

Out of scope: raw/headerless ARM (incl. Cortex-M / Thumb-only firmware) — a
separate raw-binary-on-Windows follow-up (docs/raw-binary.md).

Changes

  • src/ghidra/GhidraProvider.ts — admit arm/arm64 in inspectWindowsP0TargetSupport
  • src/ghidra/GhidraProviderCapabilities.ts — capability description
  • src/ghidra/GhidraProvider.behavior.test.ts — Windows P0 admission test updated
  • docs/windows-ghidra-p0.md — supported boundary, language mapping, verification note

Verification

  • npm run check:fast (typecheck + lint): pass
  • GhidraProvider.behavior.test.ts: 49/49 pass

Still pending (per the #718 MIPS precedent): source-built ARM64 PE fixtures
(EXE + DLL) with verified function entry + decompiler readback, confirmed on a
Windows-on-Arm host via npm run verify:ghidra. This PR gates admission only;
it should not merge before that real-provider verification lands. Opening as a
draft for that reason.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/2631 **Author:** [@WestLabsAI](https://github.com/WestLabsAI) **Created:** 10/13/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/windows-p0-arm-pe` --- ### 📝 Commits (9) - [`2ba5040`](https://github.com/morluto/rea/commit/2ba504012bd822c9f289e7fa161cb78d5ccb6a36) feat(ghidra): admit bounded ARM/ARM64 PE targets on Windows P0 - [`add1719`](https://github.com/morluto/rea/commit/add1719f1509c3872ed6ce47885c0e4548f015ec) test(ghidra): add source-built ARM64 PE fixtures for Windows P0 - [`da3e2e8`](https://github.com/morluto/rea/commit/da3e2e8fc30c6bda82d5536130a61bece923e711) fix(ghidra): preserve ARM64 fixture returns and scope verification claims - [`2eeac79`](https://github.com/morluto/rea/commit/2eeac79bd6bc85e9c9d5e6daacff82a973a01736) docs(ghidra): correct Windows ARM fixture verification scope - [`fd71b1f`](https://github.com/morluto/rea/commit/fd71b1ffe0c359596d731dd675699ea083c6284c) chore(ghidra): reconcile ARM prototype with captured Windows scope - [`8d48fb8`](https://github.com/morluto/rea/commit/8d48fb8a83bf997c9903a911c1e656388dc14dcc) fix(ghidra): reject conflicting Windows verifier selectors - [`4fffda8`](https://github.com/morluto/rea/commit/4fffda83bb3107654ea73c69e645a2c2f33075bc) chore: merge current main into PR #2631 - [`ff21fee`](https://github.com/morluto/rea/commit/ff21fee5ca1f6cf9bcab43ab86cc7e3fffe49e1e) Merge branch 'main' into feat/windows-p0-arm-pe - [`ffea1d8`](https://github.com/morluto/rea/commit/ffea1d80e07b82720277c3936d20ac8f82d46cef) Merge origin/main into feat/windows-p0-arm-pe ### 📊 Changes **11 files changed** (+168 additions, -76 deletions) <details> <summary>View changed files</summary> 📝 `docs/ghidra-provider.md` (+5 -2) 📝 `docs/installation.md` (+1 -1) 📝 `docs/managed-code-analysis.md` (+5 -4) 📝 `docs/native-investigation.md` (+1 -1) 📝 `docs/testing.md` (+10 -10) 📝 `docs/windows-ghidra-p0.md` (+14 -3) 📝 `scripts/create-ghidra-windows-fixture.mjs` (+53 -25) 📝 `scripts/verify-real-ghidra-windows.mjs` (+43 -13) 📝 `src/ghidra/GhidraProvider.behavior.test.ts` (+27 -14) 📝 `src/ghidra/GhidraProvider.ts` (+4 -2) 📝 `src/ghidra/GhidraProviderCapabilities.ts` (+5 -1) </details> ### 📄 Description ## What Extend the Windows Ghidra **P0** admission boundary to accept native **ARM and ARM64 PE** applications and DLLs, alongside the existing x86 / x86-64 lane. Addresses morluto/rea#2186 and the scope review there. ## Why `inspectWindowsP0TargetSupport` currently rejects every non-x86 target, while the general (non-Windows) provider already treats `arm`/`arm64` as first-class architectures (`SUPPORTED_ARCHITECTURES`). The refusal is a P0 policy gate, not an engine limitation — Ghidra analyses ARM PE/firmware fine on Windows with the P0-documented toolchain (Ghidra 12.1.4 + JDK 21). ## Scope (bounded) - Admit native, non-managed **ARM/ARM64 PE** applications and DLLs only. Every other P0 constraint is unchanged: PE-only, application/shared-library role, native/non-managed, NTFS path admission, read-only operation set, no DB mutation. - For PE, Ghidra's own PE loader selects the language from the machine field (`ARMNT` → `ARM:LE:32:v8` Thumb; `ARM64`/`ARM64EC` → `AARCH64:LE:64:v8A`), so no raw-binary language mapping is needed here. **Out of scope:** raw/headerless ARM (incl. Cortex-M / Thumb-only firmware) — a separate raw-binary-on-Windows follow-up (`docs/raw-binary.md`). ## Changes - `src/ghidra/GhidraProvider.ts` — admit `arm`/`arm64` in `inspectWindowsP0TargetSupport` - `src/ghidra/GhidraProviderCapabilities.ts` — capability description - `src/ghidra/GhidraProvider.behavior.test.ts` — Windows P0 admission test updated - `docs/windows-ghidra-p0.md` — supported boundary, language mapping, verification note ## Verification - `npm run check:fast` (typecheck + lint): pass - `GhidraProvider.behavior.test.ts`: 49/49 pass **Still pending (per the #718 MIPS precedent):** source-built ARM64 PE fixtures (EXE + DLL) with verified function entry + decompiler readback, confirmed on a Windows-on-Arm host via `npm run verify:ghidra`. This PR gates admission only; it should not merge before that real-provider verification lands. Opening as a **draft** for that reason. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:05:30 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#5292
No description provided.