Repository navigation
feat(ghidra): admit bounded PSP ELF through installed Allegrex - #1599
Conversation
Build on merged generic MIPS without weakening its policy. Bind caller-installed processor files into the analysis profile, check them again before launch, force and verify PSP language selection, retain limitations, and extend the public CLI/MCP verifier with source-owned PSP and target-switching checks. Local actual focused Vitest: 102 passed, one existing permission skip. Hosted static and real-provider results are pending.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Ready for review at Upstream CI 38092014434 passed all 19 jobs, including all four test shards and coverage aggregation. The separate real-Ghidra verification 38091449625 passed on this exact contribution source: public PSP CLI/MCP, missing-extension refusal, snapshot/A → B → A identity, and generic LE/BE MIPS including carved-firmware checks. Its focused tests were 233 passed, 0 failed, 3 skipped across 15 suites. Please review the strict PSP ELF/ABI admission boundary and installed-extension identity binding. Generic MIPS admission stays separate, and Allegrex semantics remain owned by the caller-installed extension. This does not claim general commercial-game, PRX, carved-PSP, complete VFPU, or additional-host support. The description now records the final CI result and keeps the earlier failures available. No source commits or workflow changes were added to move this PR out of draft. |
|
Thank you @jaelliot for the PSP/Allegrex contribution! I appreciate the strict ELF/ABI admission, installed-extension identity checks, and real Ghidra verification, especially the clear limits on supported inputs and hosts. I reviewed it and pushed a fix to bound directory enumeration before allocation. Thanks for the careful implementation and thorough verification. |
Scope
Follow-on to merged #1362, relating to #1330: analyze a bounded class of PSP ELF executables through REA's existing Ghidra CLI/MCP workflow using a caller-installed Allegrex extension. Ready for maintainer review; unmerged. Both the focused real-Ghidra verification and the ordinary upstream CI run have passed for the contribution head.
4bfcf81d757473b6edea66779a7b732e041d5356.926c2d6ba7975522d63a8dbb0d448f5b9d1514d4.8e1d69b; no published history was rewritten.Support boundary
ET_EXEC,EM_MIPS,e_flags=0x10a23001gprSize=1,cpr1Size=1,cpr2Size=0,fpAbi=2; no ISA extension/ASEs;flags1=1,flags2=0ghidra-allegrexin the selected Ghidra distribution; verified pairing Ghidra 12.1.3 / extension v21.4 / JDK 21Missing or different declarations remain unsupported, not inferred. This is a separate PSP profile; it does not relax generic MIPS32r2/o32 admission. See the PSP guide at this checkpoint for prerequisites and limitations.
Implementation
Reuse target parsing, provider lifecycle and public contracts. Select
PspElfLoader,Allegrex:LE:32:default, and compilerdefault; verify the observed language/compiler before serving results. Validate extension metadata and required files, bind installed content to the analysis profile, and recheck that identity before launch. Missing or incompatible prerequisites produce actionable errors without silent fallback.Evidence retains target/profile identity and the extension's known VFPU limitations. No new provider, MCP catalog, processor implementation, runtime dependency, automatic installer, proprietary fixture or commercial engine is added. Allegrex semantics stay in the upstream Ghidra extension.
Verified integration checkpoint
Verification run 38091449625, job 114328551589, completed successfully. Its artifact records source and final source as
4bfcf81d757473b6edea66779a7b732e041d5356, with clean Git status. The orchestration commit81890208c02f4e53394e897cdad4a4ca2616bc3ais not the tested application source.check:ciPSP_EXTENSION_UNAVAILABLETool archives were checksum-verified: Ghidra 12.1.3, Allegrex v21.4, PSPDEV v20261001. Targets were compiled and statically analyzed, not executed. The compact artifact is
psp-upstream-integration-926c2d6(SHA-25685a4eda8c1bc1ae472fd9d55fe272f635b506367b138afc7db4004ada797a5a8).The focused suites include PSP/MIPS regressions and the cleanup/setup areas implicated in the previous integration failures. These are existing tests, not 233 newly added cases. Discovery is not execution of the full suite. No required check is waived by the focused run.
Ordinary upstream CI
Upstream CI run 38092014434, attempt 1, completed successfully on October 10 at 22:51:53 UTC, associated with contribution head
4bfcf81d757473b6edea66779a7b732e041d5356. All 19 jobs completed successfully, including all four test shards, coverage/timing aggregation, static checks, documentation generation, source-built conformance fixtures, reconstruction readiness, real Apple artifact CLI/MCP E2E, the Windows capability/package lane, and Linux/macOS x64/arm64 package baselines.This ordinary PR-integration run is separate from the exact-source real-Ghidra verification above. Passing platform package checks does not extend the PSP profile's verified host scope beyond Linux x64. The PR was marked ready for review after these results were checked; no additional source commits or workflow changes were made for that transition.
Integration correction
A clean merge exposed a verifier defect in run 38090704268: newly added generic carved-firmware checks also ran in PSP mode and expected a generic MIPS language and generic-fixture symbols. The two-file correction scopes those checks to generic mode. All generic carved-firmware assertions remain exercised; PSP retains its ordinary CLI/MCP, known-fact, snapshot and A → B → A checks and explicitly reports carved-PSP coverage as not run. The correction changes no production code or test threshold.
Not established / review focus
This is selected static conformance, not execution equivalence or complete VFPU semantics. PRX relocation behavior, PBP/ISO/CSO inputs, live overlays, emulation, game-specific reconstruction, other host platforms and independently published PSP binaries remain unverified/out of scope. The strict producer declaration does not imply general compatibility with historical commercial PSP executables.
Installed extension code is trusted: its digest supplies interpretation/cache identity, not a signature or sandbox. Do not change the installation during a session. Please review the narrow admission boundary and installed-extension identity approach. No issue is automatically closed by this description.
Historical verification and failures