feat(libkernel): answer the uname sysctl names #6220
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6220"
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 DavidSamir on 2026-10-15T04:48:54Z.
What
Super Mario Sunshine (PPSA99312, catalog 0.10.0) aborts a second after start:
The title calls
uname, which reads five names throughsysctlin turn:kern.ostype(1.1),kern.hostname(1.10),kern.osrelease(1.2),kern.version(1.4) andhw.machine(6.1). libkernel'ssysctlserves none of them, so the first throws. (Answering only 1.1 moves the stop to 1.10, and so on; with the five logged and failed instead of thrown, those are the only names the title asks for.)sysctlnow serves the five as read-only strings from one table inSystemConfiguration.cpp:kern.ostypeFreeBSDkern.osrelease11.4-RELEASEkern.versionFreeBSD 11.4-RELEASE\nkern.hostnameAnyPS5, the namegethostnamealready reportshw.machineamd64The type, release and version are what FreeBSD 11.4-RELEASE builds without source control information (
newvers.shL45-L52, L293-L294), the FreeBSD revision the libkernel debt notes already cite. A short buffer gets the copied prefix andENOMEM, a new valueEPERM(as forhw.modelandkern.sdk_version), and a trailing name componentENOTDIR.sysctlbynameandsysctlnametomibmap the names to these MIBs. The console's strings are not measured; the debt note says so.Five commits:
feat(libkernel): answer the uname sysctl names.test(libkernel): cover the uname names through sysctl: for each, the size query, the value, a short buffer, a new value and a trailing component.feat(libkernel): accept the uname names in sysctlbyname and sysctlnametomib.test(libkernel): cover the uname names through sysctlbyname and sysctlnametomib.docs(debt): record where the uname sysctl strings come from, under Unknown function info.Tested
Windows (
03c09c459onmaina077a88df, Windows 11 10.0.26300, WinLibs GCC 15.2.0 r7, Release). The title runs used libraries built from two earlier versions of this branch (276fa63ad, 88bb8721b), whose library code differs from the head only in where the leaf check is made:main's libraries it aborts after 1 to 2 s with exit 0xc0000409 andwhat(): sysctl_nid_postfix: unsupported MIB 1.1. With the branch's it logsno disc image in the title's folder: copy your GMSE01 .iso, .gcm or .ciso beside eboot.bin, as both builds do, and then exits by itself with code 0 after 1 s instead of aborting. A run needs the player's own disc image, which is not included, so this is as far as it gets without one.main's libraries and with the branch's (ccleste, RommPS, SwanStationPS5, ProsperoTV, DOOM, ScreenTester5, Prospero Vibrate, SymphonyStation5, ProsperoStore, OpenNOW, ProsperoRadio, PSXS5): all still running at 35 s with both.SystemConfiguration.cppas onmain,guest_system_configurationaborts (exit 0xc0000409) at the first new check; with the change it passes.guest_system_configuration,guest_hostnameandguest_getoptpass.ctest --parallel 4on a full build of 88bb8721b, which differs from the head only inGuestSystemConfiguration.cpp(the trailing-component checks moved into the new test function): 1251 of 1252 pass.check_main_syncfails on this machine at a file name withéread back through the console code page; it passes withPYTHONUTF8=1, and the branch changes nothing undertools/.tools/check_conventions.py --base origin/mainpasses.tools/pr_overlap.py --branchreports no overlap with open pull requests.Linux (same commit, WSL2 Ubuntu 24.04, GCC 13.3.0, Release):
libsbuilds andguest_system_configurationandguest_hostnamepass.Not checked on a console.
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 github-actions[bot] on 2026-10-15T12:16:54Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/libs/prx/libkernel/System/src/SystemConfiguration.cppL189core/libs/prx/libkernel/System/src/SystemConfiguration.cppL171-172Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
docs/dev/debt/libkernel.mdcore/libs/tests/GuestSystemConfiguration.cppdocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mdImported from boykopovar/AnyPS5. Originally posted by nicolasfalesy on 2026-10-16T02:40:42Z.
A title that reaches this: Super Mario Sunshine (PPSA99312) from the homebrew catalog, on Linux (Intel Arc, Mesa ANV).
main5d9dcc42d: stops withsysctl_nid_postfix: unsupported MIB 1.1.main5d9dcc42d+ this PR: it gets past that and runs to its own check,[Super Mario Sunshine] no disc image in the title's folder: copy your GMSE01 .iso, .gcm or .ciso beside eboot.bin, then exits with status 0 (no disc image was installed for the test).AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-16T20:57:32Z.
A title this unblocks on Linux: Super Mario Sunshine (PPSA99312, catalog build), RTX 4070 Ti, release build, 30 s with pad input. Its
uname()asks sysctl 1.1, 1.10, 1.2, 1.4 and 6.1.main1b1f8483c: it aborts at 0 s withsysctl_nid_postfix: unsupported MIB 1.1, right after printing that its disc image is missing.03c09c459merged onto thatmain(clean merge): 2 of 2 runs exit with status 0 after the same "no disc image in the title's folder" message, which is the title's own path without the user's GMSE01 image. So the next stop needs the disc image, not AnyPS5.AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-17T07:00:45Z.
A second title this unblocks, on Windows: VLC (PPSA85300, catalog 0.4). It reaches
unamethrough its bundled libupnp, which builds itsSERVERheader (%s/%s, UPnP/1.0, Portable SDK for UPnP devices/1.14.31) from the system name and release.Windows 11 (26300), Radeon 860M (RDNA 3.5, driver 32.0.13058.8001), WinLibs GCC 15.2.0, Release, relinked with
--windows --registry --windows-fixed-base 0x400000(#4013), 60 s, audio muted:main6a32550fd: aborts at 7 s withsysctl_nid_postfix: unsupported MIB 1.1. Onmain9a3e2ac4dit ran 60 s, so something merged since then lets libupnp get as far asuname; I did not bisect which.main6a32550fd+ this head03c09c459(merged cleanly): runs 60 s at 31.0 FPS, and the last dumped frame shows VLC's full welcome page ("Welcome to VLC", the language grid).guest_system_configurationpasses.AI-assisted: yes (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T13:33:23Z.
I'm preparing a separate PR for measured kern.rng_pseudo MIB {1,50} support and its sysctlnametomib mapping. The overlap checker flags nearby insertion points in SystemConfiguration.cpp and GuestSystemConfiguration.cpp; the behavior is separate, but rebasing may need small conflict resolutions. Which PR should land first, or are you comfortable with this one landing first?
Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-18T20:05:07Z.
@LeandroLP23 thanks for the VLC run on Windows, and sorry for the slow reply. libupnp building its
SERVERheader fromunameis a good second caller to have on record.@MarcZX10 sorry I didn't answer before it landed. adriadam10 has since merged this as
b8cd204a3f, so yourkern.rng_pseudo{1, 50} PR can start from currentmain, and there's nothing left to coordinate on this side.AI-assisted: yes (Claude Code)