Repository navigation
fix(ghidra): bind existing MIPS projects to target metadata - #8605
Conversation
[Medium impact] The PR appears safe to merge; no actionable defects were found. SummaryThe PR binds saved MIPS projects to the selected target’s ELF metadata without claiming that REA performed their original import.
Review scope: the previous and current commits have different merge bases, so this review covered the full PR diff. No previous review threads were supplied. Reviews (2) · Last reviewed commit: "merge: integrate main into existing MIPS..." · Reviewed by Greptile |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Bring the branch up to date so static checks and the verifier fixture match the current module layout.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Summary
Fixes #8225. Selecting an ordinary header-selected MIPS ELF project succeeded at
open_binary, but the first query failed because its existing-project profile did not contain the fresh-import MIPS lane required by client admission. Bind the selected target's MIPS ELF metadata into the existing-project profile and validate that metadata without claiming REA performed the project's original import.Contract and scope
The existing profile and MIPS admission owners keep the project fingerprint, exact program selection and target-derived ELF facts. An existing project remains read-only, with unknown original analysis settings and completeness; no fresh-import lane is asserted. Fresh-import lane validation is unchanged. A different saved program is still rejected by the bridge's imported-byte digest check. This covers already admitted POSIX, header-selected targets; it does not widen pinned, PSP, soft-float, raw, or Windows existing-project admission.
The added target metadata changes the profile digest for existing MIPS projects, so earlier snapshots of those projects cannot be replayed under this profile. No executable is run or modified.
Evidence and validation
npm run verify:ghidra:mipspassed on macOS arm64 with Ghidra 12.1.4/JDK 21, Homebrew LLVM 23 and temporary GNU readelf 2.47. The six-fixture report includes new source-built existing-project controls for both byte orders, unchanged source project/target checks, verified process lineage and no remaining descendants. The full lane's other existing fresh-import, legacy and soft-float checks also passed.npm run test:focused -- src/ghidra/GhidraMipsProfile.test.ts src/ghidra/GhidraProvider.behavior.test.ts— 269 passed.npm run check:fast,npm run docs:check, andgit diff --checkpassed.Author readiness
Human owner:
Combined saved-project control: in a temporary checkout of #8605
f49c5f4fcwith #860200e823b9capplied, real Ghidra 12.1.4 full and compact stdio MCP inspected the caller-authored bit fields in both original MIPS projects. Big-endian offsets were 5/0, little-endian offsets 0/3, each/uintbase was inspectable, the profiles preserved target byte order and unknown original analysis settings, and original project/target hashes were unchanged. A different target with the selected project was refused by the imported-byte digest check. The combined tree passed 96 focused MIPS/profile/snapshot tests andcheck:fast. This verifies a local combination; neither PR includes the other.The same temporary combination also passed the complete
npm run verify:ghidra:mipslane: all six fixtures passed, including both saved-project controls, with unchanged source project and target hashes, verified process lineage, and no remaining descendants. This is a combined result, not a claim that either PR contains the other.