fix(libkernel): return ENOENT for measured absent sysctl MIBs #7556
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/7556"
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 MarcZX10 on 2026-10-18T13:49:55Z.
What
sysctlnow returns-1withENOENTfor four exactkern.*MIBs measured on a PS5 payload process (firmware 12.70):{1, 2147482816, 2147482814}(kern.smp.maxcpus),{1, 2147483151}(kern.stackprot),{1, 2147483182, 2147483181}(kern.sched.name) and{1, 2147482838, 2147482834}(kern.timecounter.hardware). The measured read and size-query calls leave the buffer and length unchanged, including calls with a null buffer, a null length, or both null. The evidence and full probe logs are in #7541.This adds the four numeric
sysctlcases that #7541 documents as still throwing. It does not add name-to-MIB mappings or infer write behavior: writes to these exact MIBs continue to throw because the console probes did not test writes. Longer MIBs remain unsupported.The regression covers all four MIBs for reads, size queries, null output-pointer combinations, unchanged outputs, and the unmeasured write path.
Tested
SystemConfiguration.cppwithg++ -std=c++20 -Icore/libs -Icore.python3 tools/check_conventions.py --base upstream/mainandgit diff --checkpass.python3 tools/pr_overlap.py --branch codex/libkernel-sysctl-mib-enoentreports no overlap with open pull requests.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-18T14:06:59Z.
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)docs/dev/debt/libkernel.mdL228docs/dev/debt/libkernel.mdL228Some 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.mddocs/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.mdcore/libs/prx/libkernel/System/src/SystemConfiguration.cppcore/libs/tests/GuestSystemConfiguration.cppdocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mdImported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T14:46:07Z.
Clarified the debt entry in
aa3d15c60: it now states thatsysctlnametomibstill throws for these four names, while #7541 implements mappings for nine of the other names.git diff --checkpasses.Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-18T16:25:03Z.
Rebase handoff — rebased onto current
main(both commits, authorship unchanged). Two docs-debt conflicts: your sysctl MIB entry (with its#7541reference) andmain's newer entries reconciled.Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release,
BUILD_TESTING=ON, AMD RX 9070 XT / RADV): builds; conventions pass; full suite green apart from the two knownmainregressions —agc_driver_tessellation(Mesa, #5444) andagc_driver_bda_device(#7584, the fresh #5859 BDA-anchor regression, which fails on this machine too) — neither from this PR.To pick it up:
Head is
d5efd803f.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T18:14:31Z.
Thanks for preparing the rebase and running the Linux suite. I rebased the two existing commits onto current
mainat505767380and pushed the updated branch. The conflict was limited todocs/dev/debt/libkernel.md; I kept the current entries and the PR's measured MIB coverage. Both commits remain authored and committed by MarcZX10.check_conventions.pyandgit diff --checkpass locally. Your earlier Linux suite result applies to the equivalent patch before this rebase; the fresh hosted run currently passes eligibility and conventions, while the path-filtered Linux, Windows, register-context and relinker suites are skipped. The report job is still pending.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T10:13:16Z.
Rebased onto current
main(02fb1ce532) and kept the new VM-map sysctl support and its tests alongside this PR’s measured absent-MIB behavior. The conflict inSystemConfiguration.cppwas resolved by retaining both the absent-MIB matcher and main’s VM-entry implementation; the test file auto-merged.\n\nOn the updated tree, GCC syntax checks pass forSystemConfiguration.cppandGuestSystemConfiguration.cpp; conventions andgit diff --checkpass. Full CMake/CTest remains unavailable here because the checkout lacks SDL2 and XRandR development dependencies. Hosted checks are starting now.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-20T11:23:45Z.
Checked the four exact MIBs against the measurements in #7541, the null-pointer/unchanged-output cases and the write path (still throws, unmeasured); the test fails without the change and the debt entry matches #7541. Rebase onto current
main(thekern.proc.vmmaphelpers) done by the author with both blocks kept; merged.