docs(debt): note how titles call inet_pton #10162

Merged
xXPBSXx merged 1 commit from upstream-pr/10162 into main 2026-10-26 15:09:55 +00:00
xXPBSXx commented 2026-10-23 11:25:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-23T11:25:47Z.


What

The changed entry now reads:

inet_ntop, inet_pton (libkernel) - an AF_INET6 result of inet_ntop is followed by zero bytes up to size. In a payload process on a PS5 (firmware 12.70), the text forms, the order of the checks and this padding were measured through both exports. The padding was sampled at sizes from 3 to 65536, above 64 only at 65, 128, 256, 1024, 4096 and 65536; the sizes that were not sampled, sizes above 65536 and a title process are assumed to behave the same. Two titles (PPSA03001 at 0x249355d, PPSA07426 at 0x186d3ca) disassembled for this entry call inet_pton once each with the family constant 2 and test only whether the result is 0, so 1 and -1 both take the use path; what they do with AF_INET6 is not shown.

Changed: docs/dev/debt/libkernel.md. No code change.

Method: Ghidra 12.1.4 headless on the unwrapped executable of the title named; the addresses are the call sites in that executable as Ghidra maps it, read from the instruction listing (static reading only, nothing run on a console). The listing and decompiled code are game code and are not attached.

Fixes: #10161

Tested

Documentation only. tools/check_conventions.py --base upstream/main passes; git merge-tree against main is clean. Every number in the sentence was recounted against the instruction listing. Not built, not run, no title run.

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 #10161
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

AI-assisted (Claude Code).

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4982001517 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10162). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-23T11:25:47Z. --- ### What The changed entry now reads: > [inet_ntop, inet_pton](../../../core/libs/prx/libkernel/Socket/src/AddressConversion.cpp) (libkernel) - an `AF_INET6` result of `inet_ntop` is followed by zero bytes up to `size`. In a payload process on a PS5 (firmware 12.70), the text forms, the order of the checks and this padding were measured through both exports. The padding was sampled at sizes from 3 to 65536, above 64 only at 65, 128, 256, 1024, 4096 and 65536; the sizes that were not sampled, sizes above 65536 and a title process are assumed to behave the same. Two titles (PPSA03001 at 0x249355d, PPSA07426 at 0x186d3ca) disassembled for this entry call `inet_pton` once each with the family constant 2 and test only whether the result is 0, so 1 and -1 both take the use path; what they do with `AF_INET6` is not shown. Changed: `docs/dev/debt/libkernel.md`. No code change. Method: Ghidra 12.1.4 headless on the unwrapped executable of the title named; the addresses are the call sites in that executable as Ghidra maps it, read from the instruction listing (static reading only, nothing run on a console). The listing and decompiled code are game code and are not attached. Fixes: #10161 ### Tested Documentation only. `tools/check_conventions.py --base upstream/main` passes; `git merge-tree` against `main` is clean. Every number in the sentence was recounted against the instruction listing. Not built, not run, no title run. ### 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 #10161 - [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-23 11:30:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-23T11:30:12Z.

Review: APPROVED


The new title-call detail is scoped and useful: the observed callers use AF_INET, test only for a zero return, and do not establish IPv6 behavior. The measured PS5 formatting/padding behavior remains separated from the explicit sampling assumptions. I ran the exact-head conventions check and git diff --check; both pass, and the merge preview against current main is clean. This is documentation-only, so no runtime test applies. The linked issue is specifically about the missing call-site context and this PR addresses it.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5627610136 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10162#pullrequestreview-5627610136). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-23T11:30:12Z. **Review:** APPROVED --- The new title-call detail is scoped and useful: the observed callers use AF_INET, test only for a zero return, and do not establish IPv6 behavior. The measured PS5 formatting/padding behavior remains separated from the explicit sampling assumptions. I ran the exact-head conventions check and `git diff --check`; both pass, and the merge preview against current `main` is clean. This is documentation-only, so no runtime test applies. The linked issue is specifically about the missing call-site context and this PR addresses it.
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!10162
No description provided.