docs(debt): record the address family titles pass to sceNetInetPton and sceNetInetNtop #12665

Merged
xXPBSXx merged 1 commit from upstream-pr/12665 into main 2026-10-30 09:50:25 +00:00
xXPBSXx commented 2026-10-29 00:54:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-29T00:54:30Z.


What

The libSceNet debt entry for sceNetInetPton and sceNetInetNtop says that, beyond the PS5 measurements in the entry above it, the IPv6 text conversion is unverified on a console. This adds how the 53 titles run here call the two exports: 36 titles call sceNetInetPton at 107 call sites and 22 call sceNetInetNtop at 67, and every one of those call sites loads the family 2 (AF_INET) into the first argument. None loads 28 (AF_INET6) and none leaves the family undetermined, so the IPv6 text conversion that is unverified on a console is not reached by a direct call in those executables. The values come from FreeBSD 11.4 sys/sys/socket.h (AF_INET 2, AF_INET6 28), which NET_AF_INET and NET_AF_INET6 in Export.cpp match.

Changed: the one entry in docs/dev/debt/libSceNet.md (one sentence added at its end). No code change. This is read from the instructions of each title's own executable, not measured: calls from the titles' library modules and through function pointers are not seen, and an import is not a call at run time.

Method: for each import, the call sites that the relinker registry lists (the PLT stub) and every call to that stub in the executable segment; the instructions before each call, read with binutils objdump, show the last write to edi. Tail jumps (a jmp to the stub instead of a call) are not counted. No bytes or listings are attached.

Tested

  • Documentation only. tools/check_conventions.py --base upstream/main passes, and git merge-tree against main 3a2b919816 is clean.
  • Every number in the sentence was recounted independently with a second script, which gives the same counts for every title: 107 call sites in 36 titles for sceNetInetPton and 67 in 22 for sceNetInetNtop, with 0 call sites for the constant 28, 0 for any other constant and 0 undetermined. The counting script was checked on hand-written instruction sequences (xor, mov of 0, 1, 2 and 5, a register copy, a load from memory) and on sceKernelUsleep, where it finds the constants of 219 call sites in three titles. One call site (the first caller of the sceNetInetPton stub in one title) was read by hand: the instruction before the call is mov $0x2,%edi.
  • Not run: any title; the library modules of the titles; calls through function pointers.

Overlap

11 open PRs change docs/dev/debt/libSceNet.md; none of them changes the entry for sceNetInetPton and sceNetInetNtop or the entry before it (git diff -U0 of each against its merge base; #9578 adds two new entries, one for the WithScopeId forms). git merge-tree of this head with each of them conflicts for two, #9932 and #5836, and both already conflict with main on their own, so no real pair conflict remains. #10162 (merged) records how two titles call libkernel's inet_pton in libkernel.md; this entry is a different export and a different file.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

AI-assisted (Claude Code).

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5060169296 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12665). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-29T00:54:30Z. --- ### What The `libSceNet` debt entry for `sceNetInetPton` and `sceNetInetNtop` says that, beyond the PS5 measurements in the entry above it, the IPv6 text conversion is unverified on a console. This adds how the 53 titles run here call the two exports: 36 titles call `sceNetInetPton` at 107 call sites and 22 call `sceNetInetNtop` at 67, and every one of those call sites loads the family 2 (`AF_INET`) into the first argument. None loads 28 (`AF_INET6`) and none leaves the family undetermined, so the IPv6 text conversion that is unverified on a console is not reached by a direct call in those executables. The values come from FreeBSD 11.4 `sys/sys/socket.h` (`AF_INET` 2, `AF_INET6` 28), which `NET_AF_INET` and `NET_AF_INET6` in `Export.cpp` match. Changed: the one entry in `docs/dev/debt/libSceNet.md` (one sentence added at its end). No code change. This is read from the instructions of each title's own executable, not measured: calls from the titles' library modules and through function pointers are not seen, and an import is not a call at run time. Method: for each import, the call sites that the relinker registry lists (the PLT stub) and every `call` to that stub in the executable segment; the instructions before each call, read with binutils `objdump`, show the last write to `edi`. Tail jumps (a `jmp` to the stub instead of a `call`) are not counted. No bytes or listings are attached. ### Tested - Documentation only. `tools/check_conventions.py --base upstream/main` passes, and `git merge-tree` against `main` `3a2b919816` is clean. - Every number in the sentence was recounted independently with a second script, which gives the same counts for every title: 107 call sites in 36 titles for `sceNetInetPton` and 67 in 22 for `sceNetInetNtop`, with 0 call sites for the constant 28, 0 for any other constant and 0 undetermined. The counting script was checked on hand-written instruction sequences (`xor`, `mov` of 0, 1, 2 and 5, a register copy, a load from memory) and on `sceKernelUsleep`, where it finds the constants of 219 call sites in three titles. One call site (the first caller of the `sceNetInetPton` stub in one title) was read by hand: the instruction before the call is `mov $0x2,%edi`. - Not run: any title; the library modules of the titles; calls through function pointers. ### Overlap 11 open PRs change `docs/dev/debt/libSceNet.md`; none of them changes the entry for `sceNetInetPton` and `sceNetInetNtop` or the entry before it (`git diff -U0` of each against its merge base; #9578 adds two new entries, one for the `WithScopeId` forms). `git merge-tree` of this head with each of them conflicts for two, #9932 and #5836, and both already conflict with `main` on their own, so no real pair conflict remains. #10162 (merged) records how two titles call libkernel's `inet_pton` in `libkernel.md`; this entry is a different export and a different file. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes AI-assisted (Claude Code). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-10-29 00:58:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T00:58:19Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The documentation diff is clean and based on current main, but the new 53-title call-site counts are not independently reviewable without the survey output or a compact per-title report.

What I ran

Exact head: c1ec0f19d6d8bc318c3a350bde0f32b1e0a66c08; base: 3a2b91981651569163768854a1fcdc7193b6667b. The merge preview is clean. This is a documentation-only change; no compiler or operating-system environment was applicable.

git merge-tree --write-tree upstream/main refs/remotes/review/12665
python3 tools/check_conventions.py --base upstream/main --head refs/remotes/review/12665
git diff --check upstream/main...refs/remotes/review/12665

Results

Check Result
Merge preview Clean
Conventions Passed
git diff --check Passed
Build/tests Not applicable to the documentation-only diff
Raw command output
3401ab996f22675b44694be28e1ec5dab02a52ab
MERGE_TREE_EXIT=0
All conventions checks passed.
CONVENTIONS_EXIT=0
DIFF_CHECK_EXIT=0

Negative control

Not applicable: this PR changes documentation and adds no executable assertion or test.

Findings

Blocking

  • The added sentence reports 107 sceNetInetPton call sites across 36 titles and 67 sceNetInetNtop call sites across 22 titles, then derives that no direct call in those executables reaches the IPv6 conversion. The PR body describes a recount but says no bytes or listings are attached, so a reviewer cannot check the per-title counts, family-argument classification, or exclusions. Please attach a compact per-title result (title ID, call-site count, and family classification) and the recount output or script, including how tail jumps and unresolved data-flow cases are treated. Keep the stated limitations about libraries and function pointers; those are outside the claimed executable-only survey.

Non-blocking

  • The local merge preview and convention checks pass. No code behavior was changed.

Sources

Not verified

I did not rerun the title-binary survey, inspect all 53 executables, validate each disassembly classification, or test title library modules or calls through function pointers. Product build and runtime tests were not run because the change is documentation-only.

To get this to a good state

Attach the compact survey evidence and recount output, then I can verify the new figures and classification against the report and rerun the checks above on the updated head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5691609400 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12665#pullrequestreview-5691609400). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T00:58:19Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The documentation diff is clean and based on current `main`, but the new 53-title call-site counts are not independently reviewable without the survey output or a compact per-title report. ## What I ran Exact head: `c1ec0f19d6d8bc318c3a350bde0f32b1e0a66c08`; base: `3a2b91981651569163768854a1fcdc7193b6667b`. The merge preview is clean. This is a documentation-only change; no compiler or operating-system environment was applicable. ```sh git merge-tree --write-tree upstream/main refs/remotes/review/12665 python3 tools/check_conventions.py --base upstream/main --head refs/remotes/review/12665 git diff --check upstream/main...refs/remotes/review/12665 ``` ## Results | Check | Result | |---|---| | Merge preview | Clean | | Conventions | Passed | | `git diff --check` | Passed | | Build/tests | Not applicable to the documentation-only diff | <details> <summary>Raw command output</summary> ```text 3401ab996f22675b44694be28e1ec5dab02a52ab MERGE_TREE_EXIT=0 All conventions checks passed. CONVENTIONS_EXIT=0 DIFF_CHECK_EXIT=0 ``` </details> ## Negative control Not applicable: this PR changes documentation and adds no executable assertion or test. ## Findings ### Blocking - The added sentence reports 107 `sceNetInetPton` call sites across 36 titles and 67 `sceNetInetNtop` call sites across 22 titles, then derives that no direct call in those executables reaches the IPv6 conversion. The PR body describes a recount but says no bytes or listings are attached, so a reviewer cannot check the per-title counts, family-argument classification, or exclusions. Please attach a compact per-title result (title ID, call-site count, and family classification) and the recount output or script, including how tail jumps and unresolved data-flow cases are treated. Keep the stated limitations about libraries and function pointers; those are outside the claimed executable-only survey. ### Non-blocking - The local merge preview and convention checks pass. No code behavior was changed. ## Sources - [Changed debt entry at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/c1ec0f19d6d8bc318c3a350bde0f32b1e0a66c08/docs/dev/debt/libSceNet.md) - [Address-family constants at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/c1ec0f19d6d8bc318c3a350bde0f32b1e0a66c08/core/libs/prx/libSceNet/Export.cpp#L2405-L2407) - [FreeBSD 11.4 socket address-family definitions, pinned commit](https://github.com/freebsd/freebsd-src/blob/8c639945a44588f6cfdddfb057bb5aad88735da0/sys/sys/socket.h#L1923-L1983) ## Not verified I did not rerun the title-binary survey, inspect all 53 executables, validate each disassembly classification, or test title library modules or calls through function pointers. Product build and runtime tests were not run because the change is documentation-only. ## To get this to a good state Attach the compact survey evidence and recount output, then I can verify the new figures and classification against the report and rerun the checks above on the updated head.
adriadam10 commented 2026-10-29 01:22:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-29T01:22:26Z.

Review: DISMISSED


Same point as @MarcZX10's review on this head: the figures added at the end of the sceNetInetPton, sceNetInetNtop entry (107 sites in 36 titles, 67 in 22, all with family 2, none undetermined) can't be checked from the PR. The body says no bytes or listings are attached.

  • docs/dev/debt/libSceNet.md:69: please attach to the PR (not the repo) a compact per-title result (title ID, call-site count, family classification per site, address) and the recount script with its output, including how tail jumps and unresolved edi data flow were treated. Keep the stated limits (library modules, function pointers).

With that attached the sentence can be checked and merged; the rest of the diff is fine (conventions green, merge clean).

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5691753508 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12665#pullrequestreview-5691753508). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-29T01:22:26Z. **Review:** DISMISSED --- Same point as @MarcZX10's review on this head: the figures added at the end of the `sceNetInetPton, sceNetInetNtop` entry (107 sites in 36 titles, 67 in 22, all with family 2, none undetermined) can't be checked from the PR. The body says no bytes or listings are attached. - `docs/dev/debt/libSceNet.md:69`: please attach to the PR (not the repo) a compact per-title result (title ID, call-site count, family classification per site, address) and the recount script with its output, including how tail jumps and unresolved `edi` data flow were treated. Keep the stated limits (library modules, function pointers). With that attached the sentence can be checked and merged; the rest of the diff is fine (conventions green, merge clean).
MarcZX10 commented 2026-10-29 05:29:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T05:29:59Z.

Review: APPROVED


Re-checked — approved

The author supplied the requested per-title counts, per-call-site classifications and addresses, recount script, method details, and stricter-classifier results. My previous evidence request is resolved. This approval is for the documentation-only change and its explicitly limited executable-call survey.

What I ran

  • Reviewed exact head c1ec0f19d6 against current main 52c09d567d.
  • Ran git merge-tree --write-tree and git diff --check against current main.
  • Parsed the attached per-title tables and independently checked their arithmetic: 36 titles / 107 sites for pton and 22 titles / 67 sites for ntop; each table’s per-title counts sum to the stated total and classify every listed site as family 2.
  • Reviewed the recount method, classifier rules, exclusions, and synthetic checks. I did not run the supplied script because its title registries and executable inputs are not part of this PR.

Results

Check Result
Current-main merge preview Clean
git diff --check Pass
Per-title arithmetic Pass: 107/107 and 67/67 sites accounted for
Conventions / eligibility / intake / labels Hosted checks pass
Product build/test jobs Skipped; this is documentation-only

Negative control

Not applicable: the PR changes only a debt-documentation sentence and adds no executable behavior.

Findings

No blocking issue remains in this documentation diff. The new report provides the per-title and per-site-address evidence, recount script, strict handling of ambiguous register writes/control flow, and the limits of the survey. The debt claim remains explicitly scoped to direct calls found in title executables; it does not claim coverage of title libraries, function pointers, or runtime imports.

Sources

Not verified

  • I did not rerun the script or inspect the 53 executable images; the address and argument classifications remain author-reported.
  • Calls from title libraries, indirect calls, function-pointer calls, and runtime import frequency are outside the reported survey, as the author states.

To get this to a good state

No further change is required for this review. Keep the stated executable-only scope and survey limitations with the debt entry.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5693276065 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12665#pullrequestreview-5693276065). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T05:29:59Z. **Review:** APPROVED --- # Re-checked — approved The author supplied the requested per-title counts, per-call-site classifications and addresses, recount script, method details, and stricter-classifier results. My previous evidence request is resolved. This approval is for the documentation-only change and its explicitly limited executable-call survey. ## What I ran - Reviewed exact head c1ec0f19d6d8bc318c3a350bde0f32b1e0a66c08 against current main 52c09d567d2fa453494dd720fcf53a98149468e4. - Ran git merge-tree --write-tree and git diff --check against current main. - Parsed the attached per-title tables and independently checked their arithmetic: 36 titles / 107 sites for pton and 22 titles / 67 sites for ntop; each table’s per-title counts sum to the stated total and classify every listed site as family 2. - Reviewed the recount method, classifier rules, exclusions, and synthetic checks. I did not run the supplied script because its title registries and executable inputs are not part of this PR. ## Results | Check | Result | |---|---| | Current-main merge preview | Clean | | git diff --check | Pass | | Per-title arithmetic | Pass: 107/107 and 67/67 sites accounted for | | Conventions / eligibility / intake / labels | Hosted checks pass | | Product build/test jobs | Skipped; this is documentation-only | ## Negative control Not applicable: the PR changes only a debt-documentation sentence and adds no executable behavior. ## Findings No blocking issue remains in this documentation diff. The new report provides the per-title and per-site-address evidence, recount script, strict handling of ambiguous register writes/control flow, and the limits of the survey. The debt claim remains explicitly scoped to direct calls found in title executables; it does not claim coverage of title libraries, function pointers, or runtime imports. ## Sources - [Per-title report, method, and recount script](https://github.com/boykopovar/AnyPS5/pull/12665#issuecomment-6488692824) - [Debt entry at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/c1ec0f19d6d8bc318c3a350bde0f32b1e0a66c08/docs/dev/debt/libSceNet.md) - [Address-family constants at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/c1ec0f19d6d8bc318c3a350bde0f32b1e0a66c08/core/libs/prx/libSceNet/Export.cpp#L2405-L2407) ## Not verified - I did not rerun the script or inspect the 53 executable images; the address and argument classifications remain author-reported. - Calls from title libraries, indirect calls, function-pointer calls, and runtime import frequency are outside the reported survey, as the author states. ## To get this to a good state No further change is required for this review. Keep the stated executable-only scope and survey limitations with the debt entry.
THEMANnt commented 2026-10-29 07:07:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by THEMANnt on 2026-10-29T07:07:17Z.

Review: APPROVED


Reviewed c1ec0f19d6d8bc318c3a350bde0f32b1e0a66c08 against 3a2b91981651569163768854a1fcdc7193b6667b. The linked libSceNet implementation delegates IPv6 conversion to libkernel while keeping IPv4 host conversion and its own argument checks. The direct-call census explicitly excludes library and indirect calls and does not turn absent observed IPv6 calls into console conformance. No actionable finding in the documentation change.

Validation: inspected the changed wording and relevant pinned source; relative source links and git diff --check pass. Documentation-only validation: no runtime behavior changed. Author-reported title inventories, console/emulator observations and macOS/physical-GPU measurements were not independently reproduced; this review does not certify those measurements.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5694033496 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12665#pullrequestreview-5694033496). Originally posted by [THEMANnt](https://github.com/THEMANnt) on 2026-10-29T07:07:17Z. **Review:** APPROVED --- Reviewed `c1ec0f19d6d8bc318c3a350bde0f32b1e0a66c08` against `3a2b91981651569163768854a1fcdc7193b6667b`. The linked libSceNet implementation delegates IPv6 conversion to libkernel while keeping IPv4 host conversion and its own argument checks. The direct-call census explicitly excludes library and indirect calls and does not turn absent observed IPv6 calls into console conformance. No actionable finding in the documentation change. Validation: inspected the changed wording and relevant pinned source; relative source links and git diff --check pass. Documentation-only validation: no runtime behavior changed. Author-reported title inventories, console/emulator observations and macOS/physical-GPU measurements were not independently reproduced; this review does not certify those measurements.
Sign in to join this conversation.
No reviewers
No labels
No milestone
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.

Reference
boykopovar/AnyPS5!12665
No description provided.