fix(libc): report the empty host name measured on a PS5 #10128
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/10128"
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?
Imported from boykopovar/AnyPS5. Originally posted by orezraey on 2026-10-23T10:35:07Z.
What
gethostnamereturned the fixed nameAnyPS5. I measured it on a retail PS5 (firmware 13.60) with a homebrew probe, from a payload process. The source and console log are in this gist (pmisc).gethostname(buffer, 256)errnounchanged, the buffer holds an empty stringgethostname(buffer, 1)buffer[0]is 0It now reports the same empty name. Copying, the null queries and
ENAMETOOLONGfor a zero-length buffer still follow FreeBSD'sgethostname. The debt entry records the measurement and says that a title process, or a console with a configured name, may read another name.sysctlkern.hostnamestill answersAnyPS5here; my other change onSystemConfiguration.cppanswers the measured empty string there too.Tested
Windows 11, MinGW (winlibs).
guest_hostnamenow expects the empty name for every buffer length. It fails onmainand passes three runs in a row with the change.tools/check_conventions.pypasses.tools/pr_overlap.pylists #8279 (other lines of the debt file, macOS build of the tests) and #6044 (moves test files); neither changesgethostname.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-23T10:50:15Z.
Review: APPROVED
The gist records successful
gethostnamecalls with both 256-byte and 1-byte buffers, an empty string, and unchanged errno, matching the implementation. The code retains the existing null query and short-buffer behavior; the zero-length case is not claimed as a console measurement. GCC 12.2 syntax checks for the implementation and test passed, as did exact-worktree conventions, diff-check, and main-sync (3 ahead/29 behind; merge clean). The author reports the Windows hostname regression passing three times. The #8279 debt-file overlap concerns a separate interfaces entry, and #6044 is currently dirty against main with its broader test-file moves; neither implements this hostname behavior. Hosted checks pass and product jobs are skipped by the workflow.