Skip to content

test(ghidra): verify PSP VFPU prefix and vector decoding - #8614

Merged
morluto merged 8 commits into
morluto:mainfrom
jaelliot:codex/rea-psp-vfpu-conformance-20261101
Nov 6, 2026
Merged

morluto merged 8 commits into
morluto:mainfrom
jaelliot:codex/rea-psp-vfpu-conformance-20261101

Conversation

@jaelliot

@jaelliot jaelliot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add source-owned PSP/Allegrex vpfxs, vpfxt, vpfxd, and vadd.q conformance observations to REA's existing opt-in real-Ghidra PSP verifier. This is static decoding and measured opaque high-p-code coverage, not VFPU arithmetic correctness.

Problem and expected behavior

PSP admission currently verifies BITREV and basic ELF/ABI facts, but does not exercise VFPU prefix/vector sequences through public REA operations. An analyst needs an observed baseline before evaluating more complete ghidra-allegrex semantics.

Change and scope

  • Extend the existing source-owned tests/conformance/psp/probe.S fixture (no commercial binaries, no target execution).
  • Verify seven fixed prefix/consumer instruction words, mnemonics and decode status through inspect_native_instruction.
  • Reuse analyze_function and its existing native_value_flow contract to report CALLOTHER count, truncation/availability, and pseudocode liveness. Leave unavailable facts unknown.
  • Update the existing docs/ghidra-psp.md coverage guide. No new API, provider, dependency, analyzer, configuration, runtime execution, or mutation.

Contract and boundary impact

  • Semantic owner: existing PSP source fixture and verify-real-ghidra-mips.mjs --psp verifier.
  • Contribution scope: bounded static inspection; no new execution/protection-recovery authority; separate maintainer scope decision not applicable.
  • CLI/MCP, Evidence schemas, Ghidra bridge and target admission: unchanged.
  • The fixture goes through existing ELF/ABI acceptance, source-byte integrity, snapshot identity, A→B→A controls and process cleanup.
  • Expected effects: [x] read source-owned files and captured static facts; [x] launch local Ghidra verifier process; [x] write disposable fixture/project files. [ ] execute or modify target code; [ ] protection bypass; [ ] network contact in the verifier. The independent CI job downloads pinned tools to its ephemeral runner.

Evidence and regression coverage

Validation performed

  • node --check scripts/verify-real-ghidra-mips.mjs — passed.
  • oxfmt --check on touched files; npm ci, npm run build:cached, npm run check:fast, npm run docs:check — passed.
  • node scripts/verify-real-ghidra-mips.mjs --psp — passed using source-owned PSP ELF via actual REA MCP/CLI and real pinned Ghidra/Allegrex, including Evidence/snapshot/process cleanup.

Upstream CI repair and branch refresh (November 1, 2026)

The original upstream CI at PSP head 8483824 failed in repository-wide formatting and an unrelated JavaScript-runtime fixture, both also failing on the old main at d3ab0fa. The independent Frida fixture failure was separately reproduced. The earlier combined-baseline fork proof passed with those fixes applied.

Upstream has since repaired the baseline directly in 00c4f44 (fix(ci): repair verifier fixtures and formatting failures), with passing main CI. The former repair PR #8592 was closed without merge; #8596 is still an independent draft. Do not infer the repairs are missing solely because those PRs have not merged.

This PR was refreshed by a non-forced two-parent merge from main 00c4f44 onto the existing PR head, producing 36f1fed4. The resulting diff against main still contains only the original four PSP-specific files. Current upstream PR CI and fork-only current-head real PSP verification are distinct checks. The fork validation completed successfully on this exact merge head: repository-wide formatting, 11 focused JavaScript/Frida fixture regressions, build/type/lint/docs, and the real PSP/Allegrex CLI/MCP lane all passed. Upstream PR CI has also completed successfully on 36f1fed4f5b49290e3420d23e88600d9e55229d7: run 41383557605 recorded 15 successful jobs, 25 skipped jobs, and no failed jobs.

Compatibility, safety, and release

No public interface or package changes. No gameplay, proprietary binaries or runtime emulation. Validation is restricted to the cited Linux x64 toolchain.

Author readiness

Human owner: @jaelliot

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • Concrete PSP static verification gap and focused scope.
  • Existing public interfaces, identity and failure boundaries retained.
  • Real Ghidra verification and source-owned fixture.
  • Human owner completes diff, evidence and readiness review.

@greptile-apps

greptile-apps Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; no blocking code issues were found.

Summary

Adds source-owned PSP VFPU checks to the existing opt-in real-Ghidra verifier.

  • The PSP verifier reports static VFPU instruction decoding.

No actionable defects or applicable rule violations were found. Source review found no new security concern.

The merge bases differ, so the full PR was reviewed as changes since the last review. No previous review threads were supplied. Real-Ghidra validation was not rerun. Supersession could not be checked because GitHub access was unavailable.

Reviews (2) · Last reviewed commit: "merge(main): refresh PSP PR #8614 onto r..." · Reviewed by Greptile

@jaelliot
jaelliot marked this pull request as ready for review November 2, 2026 02:50
Copilot AI balanced review requested due to automatic review settings November 2, 2026 02:50
@jaelliot
jaelliot marked this pull request as draft November 2, 2026 02:50
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-04T01:29:44.506365Z 36f1fed Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the added VFPU decoding coverage.

No open issues 🎉

What changed in this PR

Extends REA’s existing opt-in real-Ghidra PSP verifier with source-owned VFPU decoding coverage. The change measures static decoding and high-p-code availability without claiming vector arithmetic correctness or changing public interfaces.

Changes:

  • Add a VFPU fixture and assertions for seven prefix/vector instruction sites.
  • Report opaque CALLOTHER counts, availability, truncation, and pseudocode presence through existing analysis contracts.
  • Document the coverage and its limits, including unverified prefix consumption and lane-level arithmetic.
File Description
tests/​conformance/​psp/​probe.S Adds a static VFPU prefix/vector instruction sequence.
tests/​conformance/​ghidra/​psp-fixture.mjs Registers the fixture symbol and asserts expected bytes, mnemonics, and decode status.
scripts/​verify-real-ghidra-mips.mjs Exercises public inspection operations and reports VFPU analysis observations.
docs/​ghidra-psp.md Explains the added coverage and semantic verification limits.

Review effort: Balanced

@jaelliot
jaelliot marked this pull request as ready for review November 4, 2026 00:54
@jaelliot
jaelliot marked this pull request as draft November 4, 2026 01:16
@jaelliot
jaelliot marked this pull request as ready for review November 4, 2026 01:26
@morluto
morluto merged commit dc9f329 into morluto:main Nov 6, 2026
57 of 60 checks passed
@morluto morluto added area: tests Test suite and verification provider: ghidra Analysis provider / engine: ghidra labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: tests Test suite and verification provider: ghidra Analysis provider / engine: ghidra

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants