mirror of
https://github.com/morluto/rea.git
synced 2026-11-05 06:45:22 +00:00
[GH-ISSUE #8190] [Design] Investigate partial outgoing data-reference evidence for Kuna functions #6474
Open
opened 2026-11-01 21:11:25 +00:00 by bsakaguchi
·
12 comments
No Branch/Tag specified
main
codex/procedure-reference-stacked
release-please--branches--main--components--rea-agents
release-please--branches--main--components--rea-agents--release-notes
codex/kuna-independent-retry
codex/byte-search-overlay-coverage
codex/open-failure-target-receipt
codex/kuna-xref-evidence
codex/ghidra-ambiguous-procedure-recovery
codex/function-source-bundle
codex/trace-function-integration-prototype
codex/snapshot-source-closure
codex/recorded-evidence-array-pages
codex/evidence-recovery-redesign
codex/trace-feature-address-scope
codex/call-discovery-scope
codex/ghidra-literal-candidate-evidence
codex/decompile-directory-independent-retry
codex/retry-provenance-base
codex/value-flow-capability-experiment
codex/ghidra-containing-instruction
cursor/readme-discord-button-ef9f
dependabot/github_actions/actions/setup-node-7.1.0
dependabot/github_actions/actions/upload-artifact-7.0.2
dependabot/npm_and_yarn/npm-minor-and-patch-d8d97ce6df
codex/kuna-1989
fix/8559-native-ui-fixture-ownership
fix/8555-go-verifier-mcp-ownership
codex/provider-capability-recovery
fix/8642-rizin-target-stdin
codex/ghidra-memory-effect-scope
codex/ghidra-annotation-entry-selector
codex/ghidra-readonly-recovery
codex/ghidra-regex-verifier-recovery
codex/evidence-discovery-view-guidance
fix/8545-bulk-append-overflow
fix/8428-navigation-refusal-alternatives
codex/address-context-recovery
codex/matching-member-limitations
codex/unknown-scope-contract
codex/evidence-view-guidance
feat/8373-native-trace-views
codex/ghidra-snapshot-verifier-binding
codex/elf-export-visibility
codex/evidence-view-recovery
codex/native-reference-cli-help
codex/provider-candidate-observation-scope
codex/kuna-session-verification
codex/ghidra-switch-lifetime-guidance
codex/pseudocode-paging-discovery
codex/clarify-evidence-view-support
codex/kuna-xrefs-selector-recovery
codex/context-capacity-recovery
codex/evidence-closure-large-links
codex/same-function-evidence-identity
codex/ghidra-verifier-inspected-jdk
codex/audit-guided-workflows
codex/crash-prompt-retained-dossiers
codex/analysis-view-error-recovery
codex/kuna-verifier-target-selection
codex/ghidra-selected-project-call-coverage
codex/docs-native-analysis-scope
codex/ghidra-java-socket-boundary
codex/ghidra-retained-snapshot-verifier
codex/ghidra-search-inventory-facts
fix/8284-zero-argument-parameter-bindings
fix/8198-ui-action-handler-offset
fix/8257-elf-entry-label-identity
fix/8304-deferred-output-schema-projection
fix/8277-call-path-computed-target-uncertainty
fix/pr-8089-conflicts
fix/ci-static-duplicate-export
dependabot/npm_and_yarn/lint-staged-17.6.0
dependabot/github_actions/actions/download-artifact-8.0.2
dependabot/npm_and_yarn/write-file-atomic-8.0.0
dependabot/npm_and_yarn/canonicalize-5.1.0
dependabot/github_actions/actions/cache/restore-6.1.0
dependabot/npm_and_yarn/toon-format/toon-4.4.0
dependabot/github_actions/actions/deploy-pages-5.0.1
codex/review-fixes-pr-2403
codex/review-fixes-pr-2400
codex/process-terminal-width
codex/test-brittleness-cleanup
verify/7167-browser-connect-macos
fix/7167-browser-connect
feat/native-matching-allowance-setting
feat/browser-scenario-dry-run
test/managed-caller-parameters-20261024
codex/parser-fortythird-boundaries
fix/6926-pinvoke-platform-decorations-20261023
fix/6889-har-body-encoding-20261023
fix/6888-sqlite-schema-budget-20261023
fix/dependency-security-gates-6708
cursor/evidence-overwrite-rebase-b4ac
feat/4057-verify-native-exports
fix/windows-acl-observer-overhead-20261022
cursor/erlang-beam-restack-4476
cursor/pe-certificate-review-bf32
fix/6116-javascript-application-fs-errors
fix/6061-unmapped-runtime-script-unknown
feat/browser-scenario-summary
fix/pe-certificates
codex/verify-3407
cursor/rebase-5699
cursor/rebase-5352
cursor/rebase-5600
cursor/fix-cli-schema-omission-10a8
codex/audit-hopper-shutdown-reasons-20261021
fix/demangle-swift-omitted-record
fix/nib-boolean-value-types
cursor/cancellation-partial-observation-a5ac
fix/ib-object-limit-reasons
fix/electron-fuse-limit-advice
fix/kuna-doctor-dangling-cache
fix/fixed-budget-refusal-advice
fix/js-ipc-listener-dedup
fix/js-return-member-provenance
fix/dmg-integrity-retry-advice
fix/ida-doctor-readiness
fix/kuna-version-probe-output-drain
fix/legacy-swift-runtime-name-matching
fix/dylib-lazy-load-commands
fix/browser-scenario-startup-cancel
fix/swift-nested-punycode-classification
fix/compare-unselected-scopes
fix/objc-method-budget-coverage
fix/dmg-mounted-root-observations
audit/ci-tests-20261019-round2
release/6.7.0
fix/wabt-cleanup-retry-resolution
fix/electron-fuse-elf-pe-architecture
fix/native-plist-descriptor-ownership
fix/kuna-caller-cleanup-ownership
experiment/atomic-codemode-20261016
review/first-contributor-3776
fix/call-resolution-full-read-cycles
fix/member-mutation-selection-repeat
experiment/atomic-re-tools-20261015
perf/member-mutation-lazy-origins
perf/static-network-mutation-index
fix/hopper-startup-lifecycle
audit/3050-windows-proof-20261015
feat/windows-window-capture-2183
audit/3049-windows-proof-20261015
audit/3735-macos-fixtures-20261015
fix/batch-decompile-null-pseudocode
fix/kuna-inventory-honors-jobs
experiment/browser-codemode-tool-design-20261015
fix/hopper-clean-runtime-argv
codex/review-2049-27f1b367
review-fixes/pr-2787-routing
fix/3360-scoped-this-emitters
fix/3367-replaced-global-effects
fix/3838-compact-any-value-items
test/hopper-download-probe-20261015
codex/windows-runtime-creation-red-green-20261015
codex/windows-readonly-root-red-green-20261015
codex/windows-root-share-red-green-20261015
codex/exp-1685-win-mcp-startup
codex/bug-sweep-20261015
investigate/2190-windows-package-phases
investigate/3543-macos-cli-deadline
perf/3281-reverse-tools-feedback-quality
fix/3406-hopper-doctor-fixture
fix/3341-wrapper-require-test-context
fix/3301-owned-uninstall-fixtures
fix/3164-compiler-input-ownership
fix/pcap-cleanup-stdout-newline-20261014
perf/interface-builder-summary
codex/review-fixes-pr-1977
fix/ghidra-effective-jvm-platform
fix/docs-turkish-rust-link-20261013
fix/main-maintenance-ci-20261010
fix/recover-binary-session-process-effects
codex/review-fixes-pr-2457
codex/ci-required-cancellation-gate
fix/main-format-baseline-20261013
fix/setup-preserve-entry-fields
cursor/restore-main-checks-1ffc
fix/ghidra-bridge-hashmap-import
codex/shared-ci-jadx-json-default-20261013
codex/shared-ci-ghidra-test-groups-20261013
codex/shared-ci-java-fixture-format-20261013
codex/fix-intrinsic-invocation-boundaries
test/release-preflight-reusable-jobs
test/js-parameter-provenance-expectation
fix/linux-hopper-verification-current
test/2419-ghidra-elf-probe-size
followup/pr-1544-native-ida
codex/fold-pr-2230-contribution
docs/readme-responsible-use
fix/issue-2064
fix/issue-2050
fix/issue-2053
fix/issue-1968
fix/issue-1945
experiment/codemode-bridge-20261011
fix/tool-effects-negative-wording-1904-20261012
fix/1842-electron-interop-provenance
feat/recover-javascript-multi-input
refactor/website-i18n-prep
fix/nativeaot-pe-virtual-extent
fix/browser-verifier-ci-hang
fix/pe-resources-input-selection
docs/beginner-friendly-guides
docs/beginner-setup-guide
fix/javascript-analysis-worker-1563
fix/1649-ghidra-duplicate-names
fix/javascript-export-keys-integration-1369
test/maintenance-boundary-contracts-20261011
review/javascript-export-keys-1369
review/process-live-progress-1483
test/javascript-1495-growth-ratio
fix/ci-escape-timing
docs/normalized-terminal-geometry-1450
release/6.3.0
archive/release-6.3.0-pr1381
release/6.2.0
fix/electron-preload-dynamic-override
fix/javascript-self-referential-bundler-edges
release/6.1.0
cursor/grok-client-cherry-pick-0b56
feat/signature-posture
feat/dyld-shared-cache
feat/artifact-integrity-policy
feat/pkg-inventory
release/6.0.0
chore/sync-release-5.0.0
release/5.0.0
cursor/cloud-agent-node-787e
fix/javascript-xhr-open-endpoints
review/pr-711-realpath-fallback-wording
cleanup/replay-confinement
codex/test-suite-performance
codex/issue-foundations
codex/address-open-issues-2026-07-20
agent/javascript-vite-rollup-esbuild-adapters
agent/process-cleanup
agent/triage-integration
agent/unknown-commands-registry
feat/mcp-identity-metadata
morlvps/issue_cleanup
codex/installer-redesign
morl/roadmap-investigation-core
morl/roadmap-investigation-docs
release-please--branches--main--components--rea
rea-agents-6.8.0
rea-agents-6.7.0
rea-agents-6.6.0
experiment/atomic-codemode-wait-runtime-20261016
rea-agents-6.5.0
rea-agents-6.4.0
rea-agents-6.3.0
rea-agents-6.2.0
rea-agents-6.1.0
rea-agents-6.0.0
rea-agents-5.0.0
rea-agents-4.1.0
rea-agents-4.0.1
rea-agents-4.0.0
rea-agents-3.2.1
rea-agents-3.2.0
rea-agents-3.1.0
rea-agents-3.0.0
rea-agents-2.7.0
rea-agents-2.6.0
rea-agents-2.5.1
rea-agents-2.5.0
rea-agents-2.4.0
rea-agents-2.3.0
rea-agents-2.2.0
rea-agents-2.1.0
rea-agents-2.0.0
rea-agents-1.7.0
rea-agents-1.6.0
rea-agents-1.5.0
rea-agents-1.4.0
rea-agents-1.3.0
rea-agents-1.2.0
rea-agents-1.1.0
rea-agents-1.0.0
rea-agents-0.5.0
rea-agents-0.4.0
rea-agents-0.3.0
rea-0.2.1
rea-0.2.0
Labels
Clear labels
area: bridge
area: bridge
area: build
area: build
area: build
area: cli
area: domain
area: evidence
area: mcp
area: native
area: providers
area: runtime
area: server
area: setup
area: tests
bug
design
documentation
enhancement
enhancement
enhancement
experiment
help wanted
i18n
invalid
P0: critical
P1: high
P2: medium
P2: medium
P2: medium
P3: low
performance
provider-request
pull-request
Mirrored from GitHub Pull Request
question
roadmap
triage
No labels
area: bridge
area: bridge
area: build
area: build
area: build
area: cli
area: domain
area: evidence
area: mcp
area: native
area: providers
area: runtime
area: server
area: setup
area: tests
bug
design
documentation
enhancement
enhancement
enhancement
experiment
help wanted
i18n
invalid
P0: critical
P1: high
P2: medium
P2: medium
P2: medium
P3: low
performance
provider-request
pull-request
question
roadmap
triage
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
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#6474
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @morluto on GitHub (Oct 30, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/8190
Before submitting
Decision needed
Can REA help an analyst inspect a function's outgoing data references with Kuna, while preserving the semantics and incomplete coverage of the underlying evidence? How should such observations relate to the existing
procedure_referencesand function dossier contracts?Context and evidence
On a self-built, unexecuted arm64 Mach-O (SHA-256
ffad1b70c6a5a7ef3f7c3f59126be516520210777d949b35e97c9067f272aa2d), source function_adjustreads the globalglobal_countat0x100004000.procedure_references({"procedure":"_adjust","direction":"outgoing"})reported aREADfrom0x100000420to0x100004000, along with stack references.procedure_referencesreturnedcapability_unavailable, and the function dossier explicitly limited its outgoing graph to call-kind edges.procedure_calleesdid return the known_evaluateto_adjustcall.kuna xrefs <binary> --from _adjust --jsonreturned adataedge from0x10000041cto0x100004000for the address-formingadrpinstruction, not areadedge for the later load.--kind read,writereturned no edges. The same result labeledglobal_countas ato_function, consistent with the separately reported inventory misclassification in #8168.kuna xrefs --from _evaluatereturned the expected call and also adataedge whose source and target were the call instruction's own address. Its meaning and validity remain unknown. This is one fixture, not a general accuracy or coverage estimate.This matters for questions such as “which globals are referenced by this function?” Existing REA references, call graphs and data-flow models carry different meaning; the upstream output is not evidence that the currently advertised Ghidra-style reference contract can simply be reused unchanged.
Expected interaction with targets
Read existing files or captured data and launch the existing caller-supplied static provider. Do not execute the target.
Boundary details (optional)
Preserve source and target coordinates, address-space and image mapping, edge kinds, instruction evidence, provider identity and profile, incomplete/unknown coverage, and disagreement between evidence sources. Do not infer that an address-forming instruction performs a read or that an upstream
to_functionis a verified function. Treat unresolved or filtered-out observations as unknown, not absence.Options and tradeoffs
Investigate a bounded provider-neutral observation or explicitly partial extension to an existing analyst workflow. Compare Kuna's
--fromsemantics with Ghidra ReferenceManager and other providers before deciding whether to expose these under a shared contract. A raw CLI wrapper would not resolve the coverage and classification differences.Verification available so far
I have a prototype or observed results.
Success criteria and open questions
Exercise independent call, branch, address-formation, data load/store, literal, indirect, alias and unmapped cases; compare positive and negative examples across architectures. Verify CLI/MCP Evidence and empty-result semantics. Establish what the apparent self-reference represents before filtering it or treating it as a valid data edge.
References
Related: #8168 (Kuna inventory includes data), #8170 (Kuna original byte reads), #8184 (feature-trace reference coverage). REA source baseline
d48e472faplus unrelated Kuna version baseline changes in #8187; macOS arm64.Kuna v1.988 release control
On main
53363166f, macOS arm64 and real compact stdio MCP, the same owned, unexecuted AArch64 call-site and PC-relative fixtures were analyzed with released Kuna 1.986 and 1.988 in isolated caches. In 1.986,xrefsreturned each of four BL call sites as its own incoming reference; 1.988 returned none of those four. Both versions retained the tested real call-target incoming reference, four callee addresses, the reached call path and the legitimate address-formation self-reference. For the adjacent-instruction ADR control, 1.986 returned no reference and 1.988 returned the expected earlier instruction; both kept the tested later reference. Fixture digests were unchanged. This corroborates the release on two fixtures, not every data-reference kind, architecture or source-coverage claim.REA recorded the 1.988 binary and version with
verified_release: false, because its release policy still names 1.986. The complete realverify:kunalane also passed with 1.988 on this host for generated Mach-O and supplied symbol-bearing/stripped ELF fixtures, reporting verified process lineage and complete cleanup. That alone does not establish cross-platform verification or mean this broader outgoing-reference design question is resolved.Kuna 1.988 read, write and address controls
On REA
859e5fb95(based ond3ab0faf5with an unrelated function-matching change), macOS arm64, real compact stdio MCP and direct Kuna 1.988 re-examined the original unexecutedworkflowMach-O (SHA-256ffad1b70c6a5a7ef3f7c3f59126be516520210777d949b35e97c9067f272aa2d, unchanged). Unlike the 1.986 result above, directkuna xrefs --from _adjust --jsonnow reports both thedataADRP at0x10000041cand areadLDR at0x100000420to0x100004000;to_functionis null. REA/Kuna still reportsprocedure_referencesascapability_unavailable, while its procedure assembly shows the load and address. Real REA/Ghidra returns outgoing reference Evidence for the same function. This is a changed upstream observation, not a new claim of complete reference coverage.A second source-owned, unexecuted arm64 Mach-O independently separates
audit_read,audit_writeandaudit_addressfunctions against the same volatile global at0x100004000. Direct Kuna 1.988 reports, respectively:dataat0x1000003c0andreadat0x1000003c4;dataat0x1000003d8andwriteat0x1000003dc; anddataat0x1000003e8.otool -tvVconfirms ADRP/LDR, ADRP/STR and ADRP/ADD respectively. Real REA/Ghidra reports the global READ at0x1000003c4, WRITE at0x1000003dc, and DATA at0x1000003ec(the ADD, rather than Kuna's ADRP). REA/Kuna returnscapability_unavailablefor all threeprocedure_referencesrequests. The second fixture SHA-256 was unchanged (b5df909ecf873463f83af441d75127d92da78dfe759749a7221216f6ec671171).These controls show a useful 1.988 capability that the current REA route cannot convey, and demonstrate provider-specific differences in where address formation is attributed. They do not establish equivalence of provider kinds, exhaustive reference coverage, behavior on other architectures or profiles, or runtime memory access. A shared design must preserve each provider's observation and unknown classification fields rather than inventing Ghidra-style false flags.
x86-64 read, write, address and unknown-target control
On REA branch
ae8223ccdfa0d5dbc659ddcbb7d6acf360343c3f, macOS arm64, direct Kuna 1.988 and real Ghidra 12.1.4 stdio MCP, a source-owned x86-64 ELF contains separatemov global(%rip), %eax,mov %edi, global(%rip),lea global(%rip), %rax,mov (%rdi), %eax, and immediate-only functions. Independent LLVM disassembly confirms these instructions. Kunaxrefs --fromreturned respectivelyread,write, anddataat source offsets0x1248,0x124f, and0x1256, all targeting0x32d8; both the indirect-load and immediate-only functions returned no outgoing rows. REA/Kunaprocedure_referencesreturnedcapability_unavailablefor all five whileprocedure_assemblyshowed the instructions.REA/Ghidra
procedure_referencesreturned correspondingREAD,WRITE, andDATAobservations in its separately mapped coordinates (0x101248,0x10124f,0x101256→0x1032d8). It returned empty recorded reference lists for both the indirect load and immediate-only function. Its generic Evidence limitation identifies Ghidra ReferenceManager as the source, but neither empty list alone distinguishes a memory access with an unknown target from no memory instruction. In a separate compact MCP control,analyze_functionreported a high-p-codememory_readeffect for the indirect load, while the direct read and write had empty effects and appeared in the reference results instead (see #8336). These observations do not prove runtime accesses or exhaustive inventories.Both providers were exercised in full and compact MCP profiles for references and assembly; successful replies validated against advertised output schemas. The dossier control was compact only. The target was not executed and its SHA-256 remained
d3baa5cf385b68e3a8de02ed0884d9c9e781bd2c6b63201250635e4dc37655e8. An initial combined harness timed out before logging the stalled request; separately instrumented provider/profile runs completed. These are constructed fixtures on one host, not coverage or frequency estimates.Released Kuna 1.989 and indirect-read control
On main
9ebbe67e, macOS arm64, I built a new owned, unexecuted arm64 Mach-O with separate volatile-global read, write, address-return and pointer-parameter indirect-read functions. Direct released Kuna 1.989xrefs --fromreporteddataat0x1000003c0andreadat0x1000003c4for the global read;dataat0x1000003d8andwriteat0x1000003dcfor the global write; anddataat0x1000003e8for the global address. All target0x100004000. Its indirect-read query had no outgoing rows, while its coverage reported the function decoded; that does not establish absence of an indirect read.otool -tvVindependently showed the global ADRP/LDR and ADRP/STR, ADRP/ADD address formation, and the pointer-parameter LDR at0x100000400.In real compact and full stdio MCP, REA/Kuna returned
capability_unavailablefor outgoingprocedure_referenceson all four, whileprocedure_assemblysucceeded. REA/Ghidra 12.1.4 reported the global READ at0x1000003c4, WRITE at0x1000003dc, and DATA at0x1000003ec; the write and indirect functions also had stack references. The indirect target did not appear as a resolved outgoing reference. In a separate compact-profile complete Ghidra dossier,native_value_flow.effectsreported amemory_readat0x100000400#6, an existing workflow that preserves the indirect access without inventing a destination.The fixture SHA-256
64acc2d130f29358567f75185e430de7a457a2d2cd0f0cbf22dbc379a4cac2e7remained unchanged. Successful calls used fetched SDK definitions. This confirms behavior on one constructed fixture and host, not provider completeness, runtime access, or automatic agent selection. Kuna's--fromrowaddress_hexis the destination in this result; the source sites above usefrom_address_hex.Existing value-trace alternative for the indirect load
On the same arm64 fixture and main
9ebbe67e, realtrace_native_values({procedure: "_audit_indirect"})in both compact and full MCP profiles returned, with Ghidra 12.1.4, a four-node/three-edge trace: parameter ordinal 0 has a derivedparameter-useedge to theLOADat0x100000400#6, followed by def-use edges through a copy to the return. The trace's limitations state alias dependencies remain unknown; it does not name a concrete memory destination or prove runtime behavior. The node's reportedis_dead: trueandblock_membership: memberremain distinct as documented.With released Kuna 1.989, the same public workflow returned an explicit
Provider has no native def-use modelunknown and zero nodes rather than a resolved trace, in both profiles. This is an existing Ghidra route for the pointer-use question, not a substitute for the missing Kuna outgoing-reference support. The target SHA-25664acc2d130f29358567f75185e430de7a457a2d2cd0f0cbf22dbc379a4cac2e7was unchanged and it was not run.Value-trace handoff qualification
On main
9ebbe67e, repeating the Ghidra value trace for this same_audit_indirectfixture and exporting Evidence reproduced #8282 in compact and full MCP profiles: the trace and alias limitation were retained, but the repeated trace's procedure source ID was absent after import into a fresh server. Its top-level Evidence link cited the retained original source instead. Separate #8384 heada20c186eb81785c96267f33cec3929ea5aeb8130retained and resolved the source in the same real-provider offline control. A disposable merge of #8384 and #8734 also passed the tested trace and pseudocode replay handoffs; see #8282 for exact scope. These checks do not change the observed load graph or establish a concrete indirect destination. The unexecuted fixture SHA-25664acc2d130f29358567f75185e430de7a457a2d2cd0f0cbf22dbc379a4cac2e7remained unchanged.Instruction-local Kuna p-code control
Direct Kuna 1.989
raw-pcode <fixture> 0x100000400 --count 1 --jsonon the indirect-read fixture returned oneldr w0, [x8]instruction with aLOADoperation and instruction bytes000140b9. This confirms Kuna exposes an instruction-local memory operation even when its outgoing xref query returned no resolved destination. It does not independently connect the loaded address to the function parameter: the Ghidra high-p-code trace above supplies a different, decompiler-derived def-use observation. REA/Kuna does not expose this direct command astrace_native_values; the existing tool returns an unavailable-def-use unknown. A future design should distinguish raw instruction semantics from high-p-code def-use, keep unresolved memory targets unknown, and choose the analyst task before considering a provider-specific surface. The unexecuted fixture SHA-256 remained64acc2d130f29358567f75185e430de7a457a2d2cd0f0cbf22dbc379a4cac2e7.Raw p-code scope controls
On the same unexecuted fixture with Kuna 1.989, separate one-instruction raw-p-code queries reported
COPYfor the global address-formingadrpat0x1000003c0;COPY, LOAD, INT_ZEXTfor the globalldrat0x1000003c4;COPY, STOREfor the globalstrat0x1000003dc; andCOPY, RETURNfor the return at0x100000408. The indirectldrat0x100000400had the same instruction bytes (000140b9) and identical instruction-local p-code operations as the global load at0x1000003c4. Its address register has a different preceding origin, not visible from that single-instruction observation. Each response reportedstop_reason: instruction_limit, so no function-level coverage is implied. Target SHA-256 remained64acc2d130f29358567f75185e430de7a457a2d2cd0f0cbf22dbc379a4cac2e7.This concrete contrast supports exposing memory-op observations with their scope and provenance if they answer an analyst's question, while requiring separate data-flow or xref evidence for a target. It does not justify treating every
LOADas a global read, inventing a resolved object, or presenting instruction-local p-code as high-p-code def-use.Existing Ghidra instruction observation
On the same fixture, real Ghidra 12.1.4 CLI
inspect-native-instructionat0x100000400returnedstatus: decoded, bytes000140b9, mnemonicldr, and operand tokensw0and[x8]; its references were empty andmemory_addressingwas unavailable. The earlier Ghidra dossier and value trace separately identified a decompiler-derived memory-read effect and parameter use. Thus the existing instruction tool can expose the actual decoded instruction without inventing a destination, but this result does not itself provide a typed memory-read effect or the parameter-to-load data flow. Kuna's raw p-code control above is likewise instruction-local, though it explicitly includes aLOADoperation. The target SHA-256 remained64acc2d130f29358567f75185e430de7a457a2d2cd0f0cbf22dbc379a4cac2e7. No comparative latency, memory, token or completeness measurement was performed.@morluto commented on GitHub (Oct 30, 2026):
A second, source-owned and unexecuted x86-64 ELF fixture (SHA-256
6e9cdb0df29fb22954750189e0fcf669819c89961b832506091b108debcde0a5) provides a positive read-kind case. Itsincrementreadsglobal_counter.xrefs --from increment --kind read,write --jsonreturned onereadfrom0x13aato0x34a0, with instructionMOV ECX,dword ptr [0x34a0]andto_function: null.procedure_referencesreturned aREADfrom0x1013aato0x1034a0plus stack references. The provider address coordinates differ from Kuna's; these are not interchangeable raw addresses.capability_unavailableforprocedure_references; its pseudocode forincrementwas available and showed the global name.This supports investigating the existing analyst question across both architectures, but neither two fixtures nor a matching instruction string establish exhaustive reference coverage or a universal address mapping. The arm64 address-forming
dataobservation and this x86-64readobservation remain distinct kinds.An additional source-owned, unexecuted x86-64 ELF (SHA-256
9e3bdc3fd0590d0074fcf3b51ca12b8c7fd361e99d1f44b1d6ac01c1382f8245) separates load, store, and branch functions. Direct Kuna--fromreportedreadforaudit_getandwriteforaudit_setat the source global address; real REA/Ghidraprocedure_referencesreported corresponding READ and WRITE edges in its own image coordinates. Both REA providers reported the two callees ofaudit_branch. Ghidra's outgoing references additionally included internal conditional and unconditional jumps, while direct Kuna--from audit_branch --kind jumpreturned zero. The difference is an observed coverage/semantic difference for this fixture, not proof either provider is generally complete or incorrect.@morluto commented on GitHub (Oct 30, 2026):
A controlled x86-64 ELF distinguishes the operand slot from the computed call target. Its unexecuted
audit_refsforms the address of a global, reads it, writes it, makes a direct call, calls indirectly through a writable pointer initialized to the same function, and has a conditional branch. Independent LLVM disassembly confirms the instruction sites; the file digest stayed unchanged.xrefs --from audit_refsproduceddata,read, andwriteobservations for the global, onecallto the function, and onecallfrom the indirect instruction to the pointer slot, withto_function: null.--tothe slot returned that same source;--tothe callee returned only the direct call. Thejumpfilter returned no edges despite the conditional jump in the disassembly.procedure_referencesreturned separateREADto the pointer slot andCOMPUTED_CALLto the function at the indirect site;resolve_native_call_targetsclassified the latter as a provider-referenceresolved-indirect.inspect_native_instructionseparately retained the read and computed call. These are static analysis observations, not proof the writable pointer has that value at runtime.procedure_references, typed instruction and call-target queries were capability unavailable.xrefsto the pointer returned the source address, without the upstream edge kind. The function's call graph reported the separately direct callee and partial coverage for unresolved indirect targets.A second unexecuted ELF isolates a populated writable slot, a zero slot, and a register-indirect call. Direct Kuna reported a
callto each slot withto_function:null, and zero xrefs for the register-indirect call. REA/Kuna returned an empty callee list with partial coverage for all three; it did not infer absence. REA/Ghidra resolved the populated-slot call to a static candidate, and marked the zero-slot and register calls unresolved with partial coverage. This is one architecture and two constructed ELF fixtures, not a general accuracy estimate. It demonstrates why a shared contract should not automatically reinterpret a Kunacallto a data address as a function-to-function edge or turn an empty upstream list into proof of no call.@morluto commented on GitHub (Oct 31, 2026):
Looping in @gensokyo-dev @kaoru0822-kitauji @N0zoM1z0 for visibility on the Ghidra, Kuna, and REA tool-design investigation.
@morluto commented on GitHub (Oct 31, 2026):
The previously noted apparent self-data row now has a reduced control and an upstream report: Kuna #1334.
In a self-built arm64 Mach-O containing only two direct
blcalls (one backwards, one forwards) and returns, direct Kuna 1.986 and source-built upstream main both returned the two correctcallrows and adatarow from eachbladdress to itself.--kind callexcluded the extra rows. The same real REA/Kuna MCP session returned each call site's own address when askedxrefsat that address; REA/Ghidra returned no incoming references to those two sites. Both providers returned the correct two callees. Thus the extra upstream rows are also visible through REA's existing incoming-address projection, which does not expose the upstream kind.Independent LLVM disassembly confirmed the instruction targets. This is one small static fixture, not evidence that all self references are wrong or that REA should filter them by shape; the upstream issue keeps the root cause unverified. Target SHA-256 was unchanged and the binary was not executed.
@morluto commented on GitHub (Oct 31, 2026):
Cross-architecture control for the Kuna self-row observation: on a separately compiled, unexecuted x86-64 ELF with backward and forward direct calls, Kuna 1.986 and source-built upstream main returned the two expected call rows with no call-site self-data rows. Real REA/Kuna MCP likewise returned no incoming xrefs for either call site and retained both callees. This is a negative control for one instruction/format combination, not a general reason to filter self references.
The comparison also shows why address-only xref interpretation needs care: REA/Ghidra returned an incoming
DATAreference to the first call site from0x200018, not a self row. REA mapped that source to original file offset 24 and read2611200000000000, the independently verified little-endian ELF entry address0x201126; the typed reference had no containing source procedure. Ghidra returned no incoming reference for the second call site and both providers retained both callees. This is one header-metadata observation, not a runtime call or exhaustive comparison. See Kuna #1334 for source-build conditions. Target SHA-256 remained unchanged and the target was not executed.@morluto commented on GitHub (Oct 31, 2026):
A bounded control for consuming incoming references rather than treating every address as a caller: on REA
2d5dec26c31662764c9adfe3ff996174901b8d49, a source-owned arm64 Mach-O has_audit_entrybeginning withbl _audit_leafat0x2c8and_audit_wrappercalling it at0x2d0. Both real Ghidra 12.1.4 and Kuna 1.986procedure_callersreported only the wrapper; bothprocedure_calleesreported the leaf, and forward/backwardtrace_call_pathreached the expected endpoints. Kunaxrefs(0x2c8)returned[0x2d0], with no self row in this fixture. CLIrea xrefsagreed with MCP for both providers.Ghidra
xrefs(0x2c8)returned[0x2d0, 0x406a]. Its typedprocedure_references(direction: incoming)classified the first asUNCONDITIONAL_CALLfrom the wrapper and the latter asDATAwith no source procedure.inspect_native_instruction(0x406a)reporteddata;inspect_native_load_imageplaced it in the loaded, non-executable__LINKEDITmapping. Thus the extra row is not established as an executable caller.trace_featurepreserved itsnot_in_procedurecontainment result. These provider observations do not justify removing non-code references or assuming every address-only xref is a call.A second similar fixture with a NOP before the call also had no Kuna self row at the interior BL. These are negative controls against the previously reported self-xref issue, not evidence that the symptom is fixed generally. Successful MCP responses passed SDK compact schema validation; both source-owned fixtures remained unchanged and unexecuted. Related upstream Noelo-Lab/kuna#1334.
@morluto commented on GitHub (Oct 31, 2026):
The earlier negative self-xref controls can be explained more narrowly: an identical arm64 instruction sequence linked at
0x2ccproduced only the real call, but linked at0x12ccproduced both that call and a self-data reference with Kuna 1.986. A logging-only upstream build tied the difference to the data-reference scanner's 4096 value floor and anINT_ADD(call_site, 4)operand; see Noelo-Lab/kuna#1334.Real REA/Kuna on the high-address control returned the self address from
xrefs(0x12cc), whileprocedure_callersandprocedure_calleesstill retained the authored wrapper/leaf relationships. The low-address control did not return the self row. Both fixtures and target hashes were unchanged; no target was executed. This supports preserving the typed origin and coverage instead of silently discarding all self-references in REA.@morluto commented on GitHub (Oct 31, 2026):
A new arm64 control shows why the source-reference contract needs both provenance and coverage rather than assuming either provider reports every address-forming operation. On REA
60149282fcfc05ac32fbc94434c107710120da6f, an owned Mach-O has threeADRfunctions: one returns its own instruction address (0x12c0), one returns the following instruction (0x12cc), and one returns an address two instructions ahead (0x12d8).otoolindependently decoded the immediates; no target was executed.Real REA/Kuna 1.986
xrefsfound the self and two-ahead sources but returned no source for0x12cc;procedure_referencesremained explicitly unavailable. Real REA/Ghidra 12.1.4 found the self source but not the latter two via xrefs. Ghidrainspect_native_instructionnevertheless decodedadr x0,0x12cc, andtrace_native_valuesshowed aCOPYof0x12ccflowing toRETURN; the same pattern held for0x12d8. These are static address values, not proof of a memory read or runtime execution. Successful MCP calls passed the SDK compact-schema check; the fixture hash was unchanged.For Kuna, a logging-only upstream build confirmed that its fall-through-value suppression removes the next-instruction
CPUI_COPY; I opened Noelo-Lab/kuna#1360. A blanket filter for self-address rows would also remove the valid first control. This sample does not establish why Ghidra omitted the other two references or how common either case is.@morluto commented on GitHub (Oct 31, 2026):
Upstream fix control relevant to this issue: I compared current Kuna main
cbfa8414with the same source plus open Kuna PR #1356, using real REA main60149282stdio MCP. Both source builds reported0.1.0and REA correctly markedverified_release: false; both used a separately supplied 1.986 compiled SLEIGH tree.On the rebuilt REA verifier Mach-O, main returned the four known self-xref rows at
BLsites; the PR build returned none. The actual call target's incoming xref, four direct callees, and a reached path to the checksum function remained. On the separate AArch64ADR x0, .control, both builds retained the legitimate self-reference. The separate next-instructionADRcase remained absent (upstream #1360). Targets were unchanged and unexecuted. This is a local two-fixture control, not a released-provider upgrade or a reason for REA to drop self-edges itself.@morluto commented on GitHub (Oct 31, 2026):
A local upstream diagnostic experiment narrows the separate next-instruction
ADRgap: after PR #1356, restricting fall-through data suppression to lifted instructions containing a call recovered the0x12c8 → 0x12ccdata reference in direct Kuna and in REA'sxrefs(0x12cc). In the same checked fixtures, the legitimateADR x0, .reference, direct call target, callees and reached path remained; separate x86-64 and AArch64 call-return controls did not gain a return-address reference.This one-line source change is not submitted or broadly validated. The upstream targeted test compilation was stopped for resource use before it completed, and the existing synthetic return-address test needs attention if such a condition is adopted. Both REA sessions used source-built Kuna
0.1.0, correctly marked unverified, with a supplied 1.986 SLEIGH tree. Target hashes stayed unchanged; no targets executed. Details and limitations: https://github.com/Noelo-Lab/kuna/issues/1360#issuecomment-6546674583.@morluto commented on GitHub (Oct 31, 2026):
Additional independent ARM64 Mach-O control on REA
d54a4661da20382ad8456564a08569fdd24131c5:READat0x100000378,WRITEat0x100000380, andDATAat0x100000384to the global0x100004000in both incoming instruction context and outgoing function references. The rawxrefslist is untyped, as advertised. These are static observations, not proof of execution.xrefs --from _mainand--to 0x100004000report only adatareference at the address-formingadrp(0x100000370); REA/Kuna returns that address and correctly reports typed instructions andprocedure_referencesunavailable.trace_native_valuesreports no provider def-use model, not an empty complete value flow.8c74a944d74f8d3349755e05441a9628b4753111) directly reports thedata,readandwriterows; REA/Kuna returns their three source addresses but not their kinds, and still reports typed instruction/function references unavailable. This is an observation about that source build, not a released-version guarantee or a recommendation to add compatibility code.A separate decompilation detail is relevant when comparing providers: verified Kuna 1.986 produced
return audit_globalin both its direct single decompile and REA's completed project export, whereas Ghidra and the unverified current Kuna source produced a return of the global's address. In the static instructionsx0receivesx8, which holds the address afteradrp/add;w9holds the loaded/updated value. This is an observed release-vs-source pseudocode difference on this fixture, not a runtime test or a claim that either decompiler's text is generally authoritative. The current-source output already agrees here, so this example alone does not establish an open upstream HEAD bug.The fixture was not executed and its SHA-256
9b1f167a30cd17cb5d4393d720336fc14d7ac3bce20ade06182b941ecf8918fdwas unchanged. One fixture does not establish complete reference coverage; preserving address formation, reads, writes, provider provenance and unknowns remains essential.@morluto commented on GitHub (Nov 1, 2026):
A cross-provider immediate-constant control for this design, on REA main
6e9ee97a, macOS arm64, real Kuna 1.986 and Ghidra 12.1.4, with MCP SDK 2.3.1 compact-schema validation:An owned, unexecuted dylib has
_audit_scalarat0x12a8:mov w0, #0x12b0; ret. The immediate coincides with_audit_targetat0x12b0; the instruction itself does not load memory or call that function. Direct Kunaxrefs --from _audit_scalarand--to 0x12b0returned adatarow between them. Ghidraprocedure_referencesalso returned aDATAreference to that address, andinspect_native_instructionseparately reported an immediate operand, fallthrough and no call/jump/read/write on the reference. A caller might interpret the returned numeric value later; these static observations do not establish its downstream use.REA/Kuna
xrefs(0x12b0)returned source0x12a8;procedure_referencesand typed instruction inspection were unavailable.trace_feature("audit_target")retained that source with an unavailable containing-procedure outcome. REA/Ghidra retained the same source plus a separate metadata reference, and resolved the source procedure. Both feature traces survived Evidence export/import into fresh target-free servers with equal normalized results and limitations. The target hash remained88599b046794dea3a1035049f01d0ecebc683fd34f4dc3367e63b9a0ba89e784; no target was executed.This is not proof either provider violates its contract: an address-valued constant can be meaningful. It is a control for the shared UX decision: a
datareference should not by itself be promoted into an observed memory access or runtime relationship, and preserving typed instruction/reference evidence where available helps an analyst assess the candidate. No broad false-positive rate or autonomous-agent behavior was measured. An unpadded low-address control returned no Kuna rows; I added it as a threshold counterexample to Noelo-Lab/kuna#1364 rather than filing a duplicate.