fix(libkernel): return ENOENT for thirteen sysctl names, as measured on a PS5 #7541

Merged
ionut27001 merged 1 commit from upstream-pr/7541 into main 2026-10-20 16:13:20 +00:00
ionut27001 commented 2026-10-18 12:58:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ionut27001 on 2026-10-18T12:58:14Z.


What

sysctlbyname now answers thirteen names the way the console answers a payload process on a PS5 (firmware 12.70), where it threw unsupported name. sysctl does the same for seven of their MIBs, and sysctlnametomib for nine of the names; the other four names still throw in sysctlnametomib.

Call Payload process, firmware 12.70 main before this PR
sysctlbyname for hw.byteorder, hw.cacheline_size, hw.machine_arch, hw.usermem, kern.clockrate, kern.maxfiles, kern.maxfilesperproc, kern.maxproc, kern.ps_strings, kern.sched.name, kern.smp.maxcpus, kern.stackprot, kern.timecounter.hardware -1 with ENOENT, buffer and length untouched. Same for a read, a size query, a null length, and a null buffer with a null length throws
sysctl for {1, 6}, {1, 7}, {1, 12}, {1, 27}, {1, 32}, {6, 4}, {6, 11} the same throws
sysctlnametomib for the seven names with those MIBs returns the MIB (all seven); errno is kept (measured for kern.maxproc, kern.ps_strings, hw.byteorder); a short count copies part of the MIB and returns ENOMEM (measured for kern.maxproc, hw.byteorder) throws
sysctlnametomib for hw.cacheline_size, hw.usermem -1 with ENOENT, count and the first three MIB words untouched throws
machdep.cacheline_size -1 with ENOENT same (unchanged, now tested with the others)

Writes: a write to the new names and MIBs throws. The probes never write a sysctl, so the console's answer to a write is not known. machdep.cacheline_size keeps returning ENOENT for a write, as on main.

Changes in docs/dev/debt/libkernel.md:

  • The machdep.cacheline_size entry now covers all fourteen names. It lists what is still not modelled: four of the names, whose MIBs the console numbers just below 2^31 (2147482814 to 2147483182), and all other names, which still throw.
  • The hw.realmem and vm.overcommit entries said the console's values were not known. They now say that a payload process on a PS5 (firmware 12.70) gets ENOENT for hw.physmem, hw.realmem and vm.overcommit, and for {6, 5} and {6, 12}.
  • Their code is unchanged: titles read them (RetroArch PPSA99169 through its dolphin_libretro core, PS5MC PPSA99420 through mimalloc), so changing them is left for a separate PR.

How the console was measured

  • Setup:
    • The console runs firmware 12.70 and is jailbroken.
    • The probes are ELF payloads built with ps5-payload-dev/sdk v0.44 and clang 18.1.8.
    • They were started through a payload manager, so they ran in a payload process, not in a title. A title process was not measured.
  • Provenance: p16's resolve lines show that its sysctlbyname, sysctl and sysctlnametomib are the ones libkernel_sys.sprx exports; p10 and p13 resolve some of them the same way, and p24 prints no resolve lines. All probes link these functions the same way.
  • Method:
    • Buffers were prefilled with 0xAA (p16, p24). Lengths were preset to 64 for a read and 77 for a size query (p16); p24 passes null lengths. MIB arrays were prefilled with 0xAA bytes (p13, p16, p24).
    • last_changed is one past the last byte that changed.
    • No sysctl was written.
  • Files: sources and the full logs are in the attached sysctl-probes.zip.
Console output (excerpt, lines copied unchanged)
p10: meta fw=0x12700001 pid=121 sdk=v0.44 compiler=Clang 18.1.8 built=Oct 18 2026 01:17:42
p13: meta fw=0x12700001 pid=125 sdk=v0.44 compiler=Clang 18.1.8 built=Oct 18 2026 01:52:02
p16: meta fw=0x12700001 pid=128 sdk=v0.44 compiler=Clang 18.1.8 built=Oct 18 2026 02:01:38
p24: meta fw=0x12700001 pid=136 sdk=v0.44 compiler=Clang 18.1.8 built=Oct 18 2026 02:48:52

p16: resolve sym=sysctlbyname module=libkernel_sys.sprx same_as_called=yes
p16: resolve sym=sysctl module=libkernel_sys.sprx same_as_called=yes
p16: resolve sym=sysctlnametomib module=libkernel_sys.sprx same_as_called=yes

p16: case absent_read name=kern.maxproc ret=-1 errno=2 len=64 last_changed=0
p16: case absent_size name=kern.maxproc ret=-1 errno=2 len=77
p16: case absent_null_oldlenp name=kern.maxproc ret=-1 errno=2 last_changed=0
p16: case absent_mib name=kern.maxproc mib=1.6 read_ret=-1 read_errno=2 len=64 last_changed=0 size_ret=-1 size_errno=2 size=77
p24: case unanswered_mib_null_oldlenp mib=1.6 ret=-1 errno=2 last_changed=0
p24: case unanswered_mib_null_both mib=1.6 ret=-1 errno=2
p24: case unanswered_name_null_both name=kern.maxproc ret=-1 errno=2
p16: case absent_mib name=hw.byteorder mib=6.4 read_ret=-1 read_errno=2 len=64 last_changed=0 size_ret=-1 size_errno=2 size=77
p16: case absent_mib name=hw.machine_arch mib=6.11 read_ret=-1 read_errno=2 len=64 last_changed=0 size_ret=-1 size_errno=2 size=77
p16: case absent_mib name=kern.ps_strings mib=1.32 read_ret=-1 read_errno=2 len=64 last_changed=0 size_ret=-1 size_errno=2 size=77
p16: case absent_mib name=kern.smp.maxcpus mib=1.2147482816.2147482814 read_ret=-1 read_errno=2 len=64 last_changed=0 size_ret=-1 size_errno=2 size=77
p16: case absent_mib name=hw.usermem nametomib_ret=-1 nametomib_errno=2
p16: case absent_read name=hw.physmem ret=-1 errno=2 len=64 last_changed=0
p16: case absent_mib name=hw.realmem mib=6.12 read_ret=-1 read_errno=2 len=64 last_changed=0 size_ret=-1 size_errno=2 size=77
p16: case absent_read name=vm.overcommit ret=-1 errno=2 len=64 last_changed=0
p16: case absent_mib name=kern.anyps5_no_such_name nametomib_ret=-1 nametomib_errno=2

p24: case nametomib2 name=hw.cacheline_size ret=-1 errno=2 count=8 m0=-1431655766 m1=-1431655766 m2=-1431655766
p24: case nametomib2 name=hw.usermem ret=-1 errno=2 count=8 m0=-1431655766 m1=-1431655766 m2=-1431655766
p24: case nametomib2 name=kern.maxproc ret=0 errno=77 count=2 m0=1 m1=6 m2=-1431655766
p24: case nametomib_null_mib name=kern.maxproc ret=0 errno=77 count=2
p24: case nametomib_short name=kern.maxproc given=1 ret=-1 errno=12 count=1 m0=1 m1=-1431655766
p13: case nametomib name=kern.maxfiles ret=0 errno=0 count=2 mib=1.7.-1431655766
p13: case nametomib name=kern.maxfilesperproc ret=0 errno=0 count=2 mib=1.27.-1431655766
p13: case nametomib name=hw.machine_arch ret=0 errno=0 count=2 mib=6.11.-1431655766
p13: case nametomib name=kern.clockrate ret=0 errno=0 count=2 mib=1.12.-1431655766
p13: case nametomib name=hw.byteorder ret=0 errno=0 count=2 mib=6.4.-1431655766

The pNN: prefix names the probe; the rest of each line is copied unchanged.

The other names and MIBs give the same lines. All of them are in the logs.

Overlaps:

  • #6044 moves GuestSystemConfiguration.cpp, so whichever lands second only has to change the path when rebasing.
  • #6220 has landed. The rebase onto main 6e27fc8f0 conflicted with it in SystemConfiguration.cpp, where its SystemStrings loop sat at the same place in sysctlbyname_nid_postfix; the resolution keeps both blocks, #6220's loop first (the names do not overlap).
  • #6833 rewrites the sysconf debt line next to the hw.realmem line; whichever lands second keeps both edits.
  • "fix(libkernel): return kern.rng_pseudo in 64-byte blocks as measured on a PS5", my other PR, changes sysctlbyname_nid_postfix, GuestSystemConfiguration.cpp and the debt line above sysconf. The two merge cleanly in either order.
  • #7556 returns ENOENT from sysctl for the four MIBs this PR's debt entry lists as still throwing, and #7554 adds kern.rng_pseudo to sysctlnametomib; both edit SystemConfiguration.cpp at the same places as this PR, so whichever lands second keeps both blocks. After #7556, the debt clause "here sysctlnametomib and sysctl throw for them" becomes "here sysctlnametomib throws for them".
  • #7070 (kern.proc.vmmap) has landed. The rebase onto main 1e774a3b22 conflicted with it in SystemConfiguration.cpp and in the debt file, where its entries sit next to this PR's blocks; the resolution keeps both, #7070's first.

Tested

Build: Windows 11 x86-64, full build with WinLibs MinGW-w64 GCC 15.2.0 (posix-seh, ucrt, r7) and -DBUILD_TESTING=ON.

Rebase (not re-tested): after #6833 landed, this branch was rebased onto main bbb45463c. The only conflict was in docs/dev/debt/libkernel.md, where #6833 changed the sysconf line next to this PR's hw.realmem and vm.overcommit lines; the resolution keeps #6833's sysconf line and this PR's two lines. The code and test changes are the same as before the rebase, and the tests above were not run again on the new base.

Tests: with this branch on top of main 9f25d0bf5b, guest_system_configuration and the other guest_* tests pass: 464 of 465 pass and guest_video_out_wqhd_detection_no_vulkan is skipped on this machine. In the parallel run (ctest -j 6), guest_video_out_wqhd_detection, guest_pthread_rwlock and guest_pthread_second_join timed out once and passed when rerun. The branch was then rebased onto main 5bf2e139ef without conflicts, since upstream changed none of its code or test files, and guest_system_configuration passes there too.

Old code, new test: with SystemConfiguration.cpp reverted to main and the new test kept, guest_system_configuration aborts.

Rebase onto main 6e27fc8f0: after #6220 landed, the branch was rebased onto main 6e27fc8f0, resolving the SystemConfiguration.cpp conflict with #6220 described under Overlaps; the other files merged without conflicts. With this branch and #7543's branch built in one tree on that main, the guest_* tests pass: 473 of 474, and guest_video_out_wqhd_detection_no_vulkan is skipped on this machine. That is the second of two full runs; the first, right after the build, timed out in four tests this PR does not touch (guest_message_destructor_unshared-decoy, guest_video_out_cursor, guest_app_info, guest_pthread_rwlock). guest_system_configuration also passed 3 runs in a row. With SystemConfiguration.cpp reverted to that main and the new test kept, guest_system_configuration aborts with sysctlbyname_nid_postfix: unsupported name hw.byteorder. The branch merges cleanly with main 3259e4c3e.

Console: behaviour measured on a PS5 (firmware 12.70), as described above.

Not tested here: Linux (a reviewer reported a Linux run in the comments), and no title.

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
    Rebase: rebased onto main 1e774a3b22. #7070 has landed since the last rebase (kern.proc.vmmap), so the rebase conflicted in SystemConfiguration.cpp, where its GuestVmEntries block and this PR's IsUnansweredMib and IsUnansweredName blocks sit at the same place; the resolution keeps both, #7070's first. It also conflicted in docs/dev/debt/libkernel.md, where #7070's kern.proc.vmmap entry and this PR's sysctl names a PS5 payload process gets ENOENT for entry sit together; both are kept, and machdep.cacheline_size stays folded into this PR's entry as before the rebase. The code and test changes are otherwise the same as before the rebase. Re-tested on the new base: full build with WinLibs GCC 15.2.0 (Windows 11), exit 0; guest_system_configuration passed twice (1.29 s, 0.06 s); with SystemConfiguration.cpp restored from main the test aborts with sysctlbyname_nid_postfix: unsupported name hw.byteorder.

  • Depends on: none

  • Fixes: none

  • Unblocks: none

  • GPUs tested: n/a

  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4909273469 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7541). Originally posted by [ionut27001](https://github.com/ionut27001) on 2026-10-18T12:58:14Z. --- ### What `sysctlbyname` now answers thirteen names the way the console answers a payload process on a PS5 (firmware 12.70), where it threw `unsupported name`. `sysctl` does the same for seven of their MIBs, and `sysctlnametomib` for nine of the names; the other four names still throw in `sysctlnametomib`. | Call | Payload process, firmware 12.70 | `main` before this PR | |---|---|---| | `sysctlbyname` for `hw.byteorder`, `hw.cacheline_size`, `hw.machine_arch`, `hw.usermem`, `kern.clockrate`, `kern.maxfiles`, `kern.maxfilesperproc`, `kern.maxproc`, `kern.ps_strings`, `kern.sched.name`, `kern.smp.maxcpus`, `kern.stackprot`, `kern.timecounter.hardware` | -1 with `ENOENT`, buffer and length untouched. Same for a read, a size query, a null length, and a null buffer with a null length | throws | | `sysctl` for {1, 6}, {1, 7}, {1, 12}, {1, 27}, {1, 32}, {6, 4}, {6, 11} | the same | throws | | `sysctlnametomib` for the seven names with those MIBs | returns the MIB (all seven); `errno` is kept (measured for `kern.maxproc`, `kern.ps_strings`, `hw.byteorder`); a short count copies part of the MIB and returns `ENOMEM` (measured for `kern.maxproc`, `hw.byteorder`) | throws | | `sysctlnametomib` for `hw.cacheline_size`, `hw.usermem` | -1 with `ENOENT`, count and the first three MIB words untouched | throws | | `machdep.cacheline_size` | -1 with `ENOENT` | same (unchanged, now tested with the others) | **Writes:** a write to the new names and MIBs throws. The probes never write a sysctl, so the console's answer to a write is not known. `machdep.cacheline_size` keeps returning `ENOENT` for a write, as on `main`. **Changes in `docs/dev/debt/libkernel.md`:** - The `machdep.cacheline_size` entry now covers all fourteen names. It lists what is still not modelled: four of the names, whose MIBs the console numbers just below 2^31 (2147482814 to 2147483182), and all other names, which still throw. - The `hw.realmem` and `vm.overcommit` entries said the console's values were not known. They now say that a payload process on a PS5 (firmware 12.70) gets `ENOENT` for `hw.physmem`, `hw.realmem` and `vm.overcommit`, and for {6, 5} and {6, 12}. - Their code is unchanged: titles read them (RetroArch PPSA99169 through its `dolphin_libretro` core, PS5MC PPSA99420 through mimalloc), so changing them is left for a separate PR. #### How the console was measured - **Setup:** - The console runs firmware 12.70 and is jailbroken. - The probes are ELF payloads built with [ps5-payload-dev/sdk](https://github.com/ps5-payload-dev/sdk) v0.44 and clang 18.1.8. - They were started through a payload manager, so they ran in a payload process, not in a title. A title process was not measured. - **Provenance:** p16's `resolve` lines show that its `sysctlbyname`, `sysctl` and `sysctlnametomib` are the ones `libkernel_sys.sprx` exports; p10 and p13 resolve some of them the same way, and p24 prints no resolve lines. All probes link these functions the same way. - **Method:** - Buffers were prefilled with `0xAA` (p16, p24). Lengths were preset to 64 for a read and 77 for a size query (p16); p24 passes null lengths. MIB arrays were prefilled with `0xAA` bytes (p13, p16, p24). - `last_changed` is one past the last byte that changed. - No sysctl was written. - **Files:** sources and the full logs are in the attached [sysctl-probes.zip](https://github.com/user-attachments/files/33628251/sysctl-probes.zip). <details><summary>Console output (excerpt, lines copied unchanged)</summary> ``` p10: meta fw=0x12700001 pid=121 sdk=v0.44 compiler=Clang 18.1.8 built=Oct 18 2026 01:17:42 p13: meta fw=0x12700001 pid=125 sdk=v0.44 compiler=Clang 18.1.8 built=Oct 18 2026 01:52:02 p16: meta fw=0x12700001 pid=128 sdk=v0.44 compiler=Clang 18.1.8 built=Oct 18 2026 02:01:38 p24: meta fw=0x12700001 pid=136 sdk=v0.44 compiler=Clang 18.1.8 built=Oct 18 2026 02:48:52 p16: resolve sym=sysctlbyname module=libkernel_sys.sprx same_as_called=yes p16: resolve sym=sysctl module=libkernel_sys.sprx same_as_called=yes p16: resolve sym=sysctlnametomib module=libkernel_sys.sprx same_as_called=yes p16: case absent_read name=kern.maxproc ret=-1 errno=2 len=64 last_changed=0 p16: case absent_size name=kern.maxproc ret=-1 errno=2 len=77 p16: case absent_null_oldlenp name=kern.maxproc ret=-1 errno=2 last_changed=0 p16: case absent_mib name=kern.maxproc mib=1.6 read_ret=-1 read_errno=2 len=64 last_changed=0 size_ret=-1 size_errno=2 size=77 p24: case unanswered_mib_null_oldlenp mib=1.6 ret=-1 errno=2 last_changed=0 p24: case unanswered_mib_null_both mib=1.6 ret=-1 errno=2 p24: case unanswered_name_null_both name=kern.maxproc ret=-1 errno=2 p16: case absent_mib name=hw.byteorder mib=6.4 read_ret=-1 read_errno=2 len=64 last_changed=0 size_ret=-1 size_errno=2 size=77 p16: case absent_mib name=hw.machine_arch mib=6.11 read_ret=-1 read_errno=2 len=64 last_changed=0 size_ret=-1 size_errno=2 size=77 p16: case absent_mib name=kern.ps_strings mib=1.32 read_ret=-1 read_errno=2 len=64 last_changed=0 size_ret=-1 size_errno=2 size=77 p16: case absent_mib name=kern.smp.maxcpus mib=1.2147482816.2147482814 read_ret=-1 read_errno=2 len=64 last_changed=0 size_ret=-1 size_errno=2 size=77 p16: case absent_mib name=hw.usermem nametomib_ret=-1 nametomib_errno=2 p16: case absent_read name=hw.physmem ret=-1 errno=2 len=64 last_changed=0 p16: case absent_mib name=hw.realmem mib=6.12 read_ret=-1 read_errno=2 len=64 last_changed=0 size_ret=-1 size_errno=2 size=77 p16: case absent_read name=vm.overcommit ret=-1 errno=2 len=64 last_changed=0 p16: case absent_mib name=kern.anyps5_no_such_name nametomib_ret=-1 nametomib_errno=2 p24: case nametomib2 name=hw.cacheline_size ret=-1 errno=2 count=8 m0=-1431655766 m1=-1431655766 m2=-1431655766 p24: case nametomib2 name=hw.usermem ret=-1 errno=2 count=8 m0=-1431655766 m1=-1431655766 m2=-1431655766 p24: case nametomib2 name=kern.maxproc ret=0 errno=77 count=2 m0=1 m1=6 m2=-1431655766 p24: case nametomib_null_mib name=kern.maxproc ret=0 errno=77 count=2 p24: case nametomib_short name=kern.maxproc given=1 ret=-1 errno=12 count=1 m0=1 m1=-1431655766 p13: case nametomib name=kern.maxfiles ret=0 errno=0 count=2 mib=1.7.-1431655766 p13: case nametomib name=kern.maxfilesperproc ret=0 errno=0 count=2 mib=1.27.-1431655766 p13: case nametomib name=hw.machine_arch ret=0 errno=0 count=2 mib=6.11.-1431655766 p13: case nametomib name=kern.clockrate ret=0 errno=0 count=2 mib=1.12.-1431655766 p13: case nametomib name=hw.byteorder ret=0 errno=0 count=2 mib=6.4.-1431655766 ``` The `pNN:` prefix names the probe; the rest of each line is copied unchanged. The other names and MIBs give the same lines. All of them are in the logs. </details> **Overlaps:** - **#6044** moves `GuestSystemConfiguration.cpp`, so whichever lands second only has to change the path when rebasing. - **#6220** has landed. The rebase onto `main` 6e27fc8f0 conflicted with it in `SystemConfiguration.cpp`, where its `SystemStrings` loop sat at the same place in `sysctlbyname_nid_postfix`; the resolution keeps both blocks, #6220's loop first (the names do not overlap). - **#6833** rewrites the `sysconf` debt line next to the `hw.realmem` line; whichever lands second keeps both edits. - **"fix(libkernel): return kern.rng_pseudo in 64-byte blocks as measured on a PS5"**, my other PR, changes `sysctlbyname_nid_postfix`, `GuestSystemConfiguration.cpp` and the debt line above `sysconf`. The two merge cleanly in either order. - **#7556** returns `ENOENT` from `sysctl` for the four MIBs this PR's debt entry lists as still throwing, and **#7554** adds `kern.rng_pseudo` to `sysctlnametomib`; both edit `SystemConfiguration.cpp` at the same places as this PR, so whichever lands second keeps both blocks. After #7556, the debt clause "here `sysctlnametomib` and `sysctl` throw for them" becomes "here `sysctlnametomib` throws for them". - **#7070** (`kern.proc.vmmap`) has landed. The rebase onto `main` 1e774a3b22 conflicted with it in `SystemConfiguration.cpp` and in the debt file, where its entries sit next to this PR's blocks; the resolution keeps both, #7070's first. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> **Build:** Windows 11 x86-64, full build with WinLibs MinGW-w64 GCC 15.2.0 (posix-seh, ucrt, r7) and `-DBUILD_TESTING=ON`. **Rebase (not re-tested):** after #6833 landed, this branch was rebased onto `main` bbb45463c. The only conflict was in `docs/dev/debt/libkernel.md`, where #6833 changed the `sysconf` line next to this PR's `hw.realmem` and `vm.overcommit` lines; the resolution keeps #6833's `sysconf` line and this PR's two lines. The code and test changes are the same as before the rebase, and the tests above were not run again on the new base. **Tests:** with this branch on top of `main` 9f25d0bf5b, `guest_system_configuration` and the other `guest_*` tests pass: 464 of 465 pass and `guest_video_out_wqhd_detection_no_vulkan` is skipped on this machine. In the parallel run (`ctest -j 6`), `guest_video_out_wqhd_detection`, `guest_pthread_rwlock` and `guest_pthread_second_join` timed out once and passed when rerun. The branch was then rebased onto `main` 5bf2e139ef without conflicts, since upstream changed none of its code or test files, and `guest_system_configuration` passes there too. **Old code, new test:** with `SystemConfiguration.cpp` reverted to `main` and the new test kept, `guest_system_configuration` aborts. **Rebase onto `main` 6e27fc8f0:** after #6220 landed, the branch was rebased onto `main` 6e27fc8f0, resolving the `SystemConfiguration.cpp` conflict with #6220 described under Overlaps; the other files merged without conflicts. With this branch and #7543's branch built in one tree on that `main`, the `guest_*` tests pass: 473 of 474, and `guest_video_out_wqhd_detection_no_vulkan` is skipped on this machine. That is the second of two full runs; the first, right after the build, timed out in four tests this PR does not touch (`guest_message_destructor_unshared-decoy`, `guest_video_out_cursor`, `guest_app_info`, `guest_pthread_rwlock`). `guest_system_configuration` also passed 3 runs in a row. With `SystemConfiguration.cpp` reverted to that `main` and the new test kept, `guest_system_configuration` aborts with `sysctlbyname_nid_postfix: unsupported name hw.byteorder`. The branch merges cleanly with `main` 3259e4c3e. **Console:** behaviour measured on a PS5 (firmware 12.70), as described above. **Not tested here:** Linux (a reviewer reported a Linux run in the comments), and no title. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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 **Rebase:** rebased onto `main` 1e774a3b22. #7070 has landed since the last rebase (`kern.proc.vmmap`), so the rebase conflicted in `SystemConfiguration.cpp`, where its `GuestVmEntries` block and this PR's `IsUnansweredMib` and `IsUnansweredName` blocks sit at the same place; the resolution keeps both, #7070's first. It also conflicted in `docs/dev/debt/libkernel.md`, where #7070's `kern.proc.vmmap` entry and this PR's `sysctl names a PS5 payload process gets ENOENT for` entry sit together; both are kept, and `machdep.cacheline_size` stays folded into this PR's entry as before the rebase. The code and test changes are otherwise the same as before the rebase. **Re-tested on the new base:** full build with WinLibs GCC 15.2.0 (Windows 11), exit 0; `guest_system_configuration` passed twice (1.29 s, 0.06 s); with `SystemConfiguration.cpp` restored from `main` the test aborts with `sysctlbyname_nid_postfix: unsupported name hw.byteorder`. - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-10-18 13:33:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T13:33:25Z.


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?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6250530523 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7541#issuecomment-6250530523). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-18T13:33:25Z. --- 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?
github-actions[bot] commented 2026-10-18 13:36:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-18T13:36:49Z.


Some 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.

Pull request Shared files not compared
PR 4630 docs/dev/debt/libkernel.md
PR 5021 docs/dev/debt/libkernel.md
PR 6044 core/libs/tests/GuestSystemConfiguration.cpp
PR 6149 docs/dev/debt/libkernel.md
PR 6469 docs/dev/debt/libkernel.md
PR 6519 docs/dev/debt/libkernel.md
PR 6658 docs/dev/debt/libkernel.md
PR 6740 docs/dev/debt/libkernel.md
PR 6893 docs/dev/debt/libkernel.md
PR 6936 docs/dev/debt/libkernel.md
PR 6977 docs/dev/debt/libkernel.md
PR 7049 docs/dev/debt/libkernel.md
PR 7088 docs/dev/debt/libkernel.md
PR 7105 docs/dev/debt/libkernel.md
PR 7121 docs/dev/debt/libkernel.md
PR 7149 docs/dev/debt/libkernel.md
PR 7464 docs/dev/debt/libkernel.md
PR 7509 docs/dev/debt/libkernel.md
PR 7530 docs/dev/debt/libkernel.md
PR 7937 docs/dev/debt/libkernel.md
PR 8437 docs/dev/debt/libkernel.md
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6250562548 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7541#issuecomment-6250562548). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-18T13:36:49Z. --- <!-- pr-overlap --> Some 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. | Pull request | Shared files not compared | |---|---| | [PR 4630](https://www.github.com/boykopovar/AnyPS5/pull/4630) | `docs/dev/debt/libkernel.md` | | [PR 5021](https://www.github.com/boykopovar/AnyPS5/pull/5021) | `docs/dev/debt/libkernel.md` | | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/libs/tests/GuestSystemConfiguration.cpp` | | [PR 6149](https://www.github.com/boykopovar/AnyPS5/pull/6149) | `docs/dev/debt/libkernel.md` | | [PR 6469](https://www.github.com/boykopovar/AnyPS5/pull/6469) | `docs/dev/debt/libkernel.md` | | [PR 6519](https://www.github.com/boykopovar/AnyPS5/pull/6519) | `docs/dev/debt/libkernel.md` | | [PR 6658](https://www.github.com/boykopovar/AnyPS5/pull/6658) | `docs/dev/debt/libkernel.md` | | [PR 6740](https://www.github.com/boykopovar/AnyPS5/pull/6740) | `docs/dev/debt/libkernel.md` | | [PR 6893](https://www.github.com/boykopovar/AnyPS5/pull/6893) | `docs/dev/debt/libkernel.md` | | [PR 6936](https://www.github.com/boykopovar/AnyPS5/pull/6936) | `docs/dev/debt/libkernel.md` | | [PR 6977](https://www.github.com/boykopovar/AnyPS5/pull/6977) | `docs/dev/debt/libkernel.md` | | [PR 7049](https://www.github.com/boykopovar/AnyPS5/pull/7049) | `docs/dev/debt/libkernel.md` | | [PR 7088](https://www.github.com/boykopovar/AnyPS5/pull/7088) | `docs/dev/debt/libkernel.md` | | [PR 7105](https://www.github.com/boykopovar/AnyPS5/pull/7105) | `docs/dev/debt/libkernel.md` | | [PR 7121](https://www.github.com/boykopovar/AnyPS5/pull/7121) | `docs/dev/debt/libkernel.md` | | [PR 7149](https://www.github.com/boykopovar/AnyPS5/pull/7149) | `docs/dev/debt/libkernel.md` | | [PR 7464](https://www.github.com/boykopovar/AnyPS5/pull/7464) | `docs/dev/debt/libkernel.md` | | [PR 7509](https://www.github.com/boykopovar/AnyPS5/pull/7509) | `docs/dev/debt/libkernel.md` | | [PR 7530](https://www.github.com/boykopovar/AnyPS5/pull/7530) | `docs/dev/debt/libkernel.md` | | [PR 7937](https://www.github.com/boykopovar/AnyPS5/pull/7937) | `docs/dev/debt/libkernel.md` | | [PR 8437](https://www.github.com/boykopovar/AnyPS5/pull/8437) | `docs/dev/debt/libkernel.md` |
MarcZX10 commented 2026-10-18 13:50:40 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T13:50:40Z.


I opened #7556 for the four additional numeric MIBs in your probe logs: it returns ENOENT on the measured sysctl read and size-query paths, while leaving writes unmodeled. It is separate from your name-to-MIB work; pr_overlap.py reports no overlapping hunks. The PR body links back to your measurement as its evidence.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6250701450 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7541#issuecomment-6250701450). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-18T13:50:40Z. --- I opened [#7556](https://github.com/boykopovar/AnyPS5/pull/7556) for the four additional numeric MIBs in your probe logs: it returns `ENOENT` on the measured `sysctl` read and size-query paths, while leaving writes unmodeled. It is separate from your name-to-MIB work; `pr_overlap.py` reports no overlapping hunks. The PR body links back to your measurement as its evidence.
MarcZX10 commented 2026-10-18 13:54:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T13:54:07Z.


Update: the separate kern.rng_pseudo PR is now open as #7554. It is behaviorally independent of the name-to-MIB cases in this PR; only adjacent insertion points may need conflict resolution during rebase. Either PR can land first, and I will keep the changes separate.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6250734774 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7541#issuecomment-6250734774). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-18T13:54:07Z. --- Update: the separate `kern.rng_pseudo` PR is now open as #7554. It is behaviorally independent of the name-to-MIB cases in this PR; only adjacent insertion points may need conflict resolution during rebase. Either PR can land first, and I will keep the changes separate.
ionut27001 commented 2026-10-18 14:37:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ionut27001 on 2026-10-18T14:37:52Z.


Thanks for picking these up. Either order is fine with me; whichever lands second resolves the conflict in SystemConfiguration.cpp (both blocks stay). One text dependency: the sysctl names a PS5 payload process gets ENOENT for debt entry here ends with "here sysctlnametomib and sysctl throw for them" for those four MIBs. After #7556 only sysctlnametomib throws, so that clause should become "here sysctlnametomib throws for them". If this PR lands first, could you adjust it in #7556? If #7556 lands first, I'll update it here. I checked the four MIBs in #7556 against the p16 log and they match.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6251177142 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7541#issuecomment-6251177142). Originally posted by [ionut27001](https://github.com/ionut27001) on 2026-10-18T14:37:52Z. --- Thanks for picking these up. Either order is fine with me; whichever lands second resolves the conflict in `SystemConfiguration.cpp` (both blocks stay). One text dependency: the `sysctl names a PS5 payload process gets ENOENT for` debt entry here ends with "here `sysctlnametomib` and `sysctl` throw for them" for those four MIBs. After #7556 only `sysctlnametomib` throws, so that clause should become "here `sysctlnametomib` throws for them". If this PR lands first, could you adjust it in #7556? If #7556 lands first, I'll update it here. I checked the four MIBs in #7556 against the p16 log and they match.
LeandroLP23 commented 2026-10-18 18:06:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-18T18:06:21Z.


Windows run. Radeon 860M (RDNA 3.5, driver 32.0.13058.8001), Windows 11 26300, WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON. Build: main c3591adf9 with #7623, #7612, #7611, #7603, #7579, #7563 and #7541 merged together (each merge clean, built once).

guest_system_configuration, guest_pthread_rwlock, guest_pthread_second_join and guest_video_out_wqhd_detection pass 3 runs of 3. guest_video_out_wqhd_detection_no_vulkan skips itself on this host. No title was run.

AI-assisted

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6253308413 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7541#issuecomment-6253308413). Originally posted by [LeandroLP23](https://github.com/LeandroLP23) on 2026-10-18T18:06:21Z. --- Windows run. Radeon 860M (RDNA 3.5, driver 32.0.13058.8001), Windows 11 26300, WinLibs GCC 15.2.0 r7, Release, `BUILD_TESTING=ON`. Build: `main` `c3591adf9` with #7623, #7612, #7611, #7603, #7579, #7563 and #7541 merged together (each merge clean, built once). `guest_system_configuration`, `guest_pthread_rwlock`, `guest_pthread_second_join` and `guest_video_out_wqhd_detection` pass 3 runs of 3. `guest_video_out_wqhd_detection_no_vulkan` skips itself on this host. No title was run. AI-assisted
jotitadev commented 2026-10-19 00:01:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-19T00:01:12Z.

Review: COMMENTED


Linux run, since the description and the existing run are Windows only.

Machine: Linux x86_64, i7-8700, Ubuntu 26.04, GCC 15.2, Release, BUILD_TESTING=ON, full build.
Head 3fac97bf6 merged onto main 84c1a4d9a (clean merge).

  • guest_system_configuration passes.
  • GuestSystemConfiguration.cpp only, on main: aborts with sysctlbyname_nid_postfix: unsupported name hw.byteorder, so the test covers the new names.
  • Non-GPU suite (ctest -E "^agc|gpu|vulkan|video_out"): 739/739, same as main.

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5565738602 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7541#pullrequestreview-5565738602). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-19T00:01:12Z. **Review:** COMMENTED --- Linux run, since the description and the existing run are Windows only. Machine: Linux x86_64, i7-8700, Ubuntu 26.04, GCC 15.2, Release, `BUILD_TESTING=ON`, full build. Head `3fac97bf6` merged onto `main` `84c1a4d9a` (clean merge). - `guest_system_configuration` passes. - `GuestSystemConfiguration.cpp` only, on `main`: aborts with `sysctlbyname_nid_postfix: unsupported name hw.byteorder`, so the test covers the new names. - Non-GPU suite (`ctest -E "^agc|gpu|vulkan|video_out"`): 739/739, same as `main`. Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
adriadam10 commented 2026-10-20 16:18:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-20T16:18:37Z.


Rebased onto current main (conflicts in SystemConfiguration.cpp with #7556 and #7554: kept both blocks, kern.rng_pseudo stays in the sysctlnametomib table). Updated the debt entry as you proposed, since #7556 now answers sysctl for the four MIBs: "here sysctlnametomib throws for them". Rest of the review unchanged (probe logs, check order, new test aborts on main); merged.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6295611068 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7541#issuecomment-6295611068). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-20T16:18:37Z. --- Rebased onto current `main` (conflicts in `SystemConfiguration.cpp` with #7556 and #7554: kept both blocks, `kern.rng_pseudo` stays in the `sysctlnametomib` table). Updated the debt entry as you proposed, since #7556 now answers `sysctl` for the four MIBs: "here `sysctlnametomib` throws for them". Rest of the review unchanged (probe logs, check order, new test aborts on `main`); merged.
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!7541
No description provided.