Files
AnyPS5/docs/dev/debt/changes/fix-libkernel-sysctl-sdk-version-mib.md
brajankwandClaude Opus 5.5 c2f3b78109 fix(libkernel): answer kern.sdk_version through MIB {1, 46}, as the firmware 10.01 kernel does
sysctlnametomib failed kern.sdk_version with ENOENT and sysctl {1, 46}
threw, though the firmware 10.01 kernel data the debt entry cites keeps
the value as a read-only constant at MIB {1, 46}. The name now sits in
the table of fixed integer nodes, so sysctlnametomib gives {1, 46}, that
MIB answers as the name does (a size query, a read, ENOMEM for a short
buffer, EPERM for a write), and {1, 46, x} fails with ENOTDIR like the
other leaves. sysctlbyname reads the same table entry. A write whose
length pointer cannot be read now fails with EFAULT before EPERM there,
as FreeBSD 11.4's sysctlbyname goes through sysctl and userland_sysctl
copies the length in first, and as the other table names already do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 23:51:56 +01:00

1.0 KiB

libkernel

change sysctl {1, 46} throws

  • kern.sdk_version (libkernel) - the console's firmware version is not modeled: sysctlbyname and sysctl {1, 46}, which sysctlnametomib gives as in the kernel data below, report 0x01000000 (1.00), the value sceKernelGetSystemSwVersion reports, and a write returns -1 with EPERM. The major version is byte 3 and the minor byte 2, in hex digits that read as decimal, as Capy Mobile (PPSA92280, which only displays it), remote_lua_loader and the lapse payload read it. In firmware 10.01 kernel data (offsets from VA 0xffffffff82510000) it is a read-only constant at MIB {1, 46} holding 0x10010000 (+0x1783d50), so the low two bytes are 0 there