Commit Graph
42 Commits
Author SHA1 Message Date
Hermes Agent 0273c1479f feat(libkernel): expose kern.osreldate sysctl 2026-10-20 18:29:40 -04:00
ionut27001andClaude Opus 5.5 dfa96f1fe6 fix(libkernel): return ENOENT for thirteen sysctl names, as measured on a PS5
In a payload process on a PS5 (firmware 12.70), sysctlbyname returns -1
with ENOENT for thirteen names that threw here, and leaves the buffer and
the length alone, for a read, a size query, a null length and a null
buffer with a null length. sysctl does the same for the fixed MIBs of
seven of them. sysctlnametomib gives those seven MIBs and returns ENOENT
for hw.cacheline_size and hw.usermem, which threw too.

machdep.cacheline_size already returned ENOENT and is now tested with
the others. A write to the new names and MIBs throws, as the console's
answer to a write was not tried. The hw.realmem and vm.overcommit debt
entries now say that a payload process gets ENOENT for them as well.

AI-assisted: yes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 13:46:29 +02:00
Adrià b9a097353c Merge pull request #7556 from MarcZX10/codex/libkernel-sysctl-mib-enoent
fix(libkernel): return ENOENT for measured absent sysctl MIBs
2026-10-20 13:23:08 +02:00
MarcZX10 99e87ce36f test(libkernel): avoid flaky random byte assertion 2026-10-20 12:29:39 +02:00
MarcZX100 7b05271abb fix(libkernel): support kern.rng_pseudo MIB access 2026-10-20 12:29:39 +02:00
Adrià 9299e6fd8a Merge pull request #7542 from ionut27001/fix/libkernel-rng-pseudo-block
fix(libkernel): return kern.rng_pseudo in 64-byte blocks as measured on a PS5
2026-10-20 12:24:51 +02:00
MarcZX10 e054c83eea Merge upstream main into measured absent sysctl MIBs 2026-10-20 10:12:56 +00:00
Adrià a77e40f93f Merge pull request #7070 from milescoviello/feat/kern-proc-vmmap
feat(libkernel): report the guest address-space map through kern.proc.vmmap
2026-10-19 19:36:11 +02:00
ionut27001andClaude Opus 5.5 dca67ae477 fix(libkernel): return kern.rng_pseudo in 64-byte blocks as measured on a PS5
In a payload process on a PS5 (firmware 12.70),
sysctlbyname("kern.rng_pseudo") answers a size query with 64 and gives
at most 64 bytes per call, up to a 65536-byte buffer. A buffer smaller
than 64 bytes gets as many bytes as its length and a null length gets
none, both with -1 and ENOMEM; a null buffer with a null length returns
0, and errno is kept when the call succeeds. Here the whole buffer was
filled, a size query threw and the length was never changed. The 64
random bytes are now drawn only for a read that passes both a buffer
and a length.

AI-assisted: yes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 14:49:39 +03:00
Adrià 62e946f114 Merge pull request #6833 from ErenYeager1836/feat/libkernel-sysconf-limits
feat(libkernel): support _SC_ARG_MAX, _SC_OPEN_MAX and _SC_IOV_MAX in sysconf
2026-10-19 13:37:44 +02:00
Adrià b8cd204a3f Merge pull request #6220 from DavidSamir/fix/libkernel-sysctl-kern-ostype
feat(libkernel): answer the uname sysctl names
2026-10-18 21:56:01 +02:00
MarcZX100 8e2f71263c fix(libkernel): return ENOENT for measured sysctl MIBs 2026-10-18 18:13:05 +00:00
milescovielloandClaude Opus 5.5 20764888c3 feat(libkernel): report the guest address-space map through kern.proc.vmmap
sysctl {CTL_KERN, KERN_PROC, KERN_PROC_VMMAP, pid} for the calling process
returns packed FreeBSD 11 kinfo_vmentry records, one per used range of the
guest arena, with the protection sceKernelVirtualQuery reports. Other pids
return ESRCH, a write EPERM, a short buffer ENOMEM. GuestArena gains a
query for the used range at or after an address.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 20:43:31 +00:00
Nithishvelan M 76e05544a9 feat(libkernel): report hw.pagesize through sysctl and sysctlnametomib 2026-10-16 20:55:46 +02:00
Nithishvelan M 301fdbe923 feat(libkernel): return getrlimit soft limit for _SC_OPEN_MAX in sysconf 2026-10-16 23:17:43 +05:30
Nithishvelan M 2e4f63b816 feat(libkernel): support _SC_ARG_MAX, _SC_OPEN_MAX and _SC_IOV_MAX in sysconf 2026-10-16 19:14:09 +05:30
David 8cda5ec0a1 test(libkernel): cover the uname names through sysctlbyname and sysctlnametomib 2026-10-15 08:38:54 +04:00
David 364f9749b7 test(libkernel): cover the uname names through sysctl
For each of the five: the size query, the value, a short buffer (ENOMEM, the copied prefix kept), a new value (EPERM) and a trailing name component (ENOTDIR).
2026-10-15 08:38:52 +04:00
AhmadandClaude Opus 5.5 cc3d25d636 feat(libkernel): implement sysctlnametomib for the sysctl names AnyPS5 serves
Map hw.model, hw.ncpu, hw.physmem, hw.realmem, kern.arandom and
kern.proc.pathname to their FreeBSD MIBs with the size handling of
FreeBSD's libc wrapper over name2oid, fail with ENOENT and ENAMETOOLONG
as name2oid does, and throw for null pointers, which FreeBSD's wrapper
dereferences, and for names sysctl does not serve.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 10:53:04 +03:00
Dean ea53213fd4 Merge pull request #4674 from zaydzaari/research/kernel-system-version-size-1342
fix(libkernel): accept measured system version record values
2026-10-14 19:06:34 +13:00
Dean a31043146e Merge pull request #5367 from MarcZX100/marc/sysctl-leaf-enotdir-5356
fix(libkernel): return ENOTDIR for trailing sysctl leaf components
2026-10-14 16:41:21 +13:00
p3nicillinandClaude Opus 5.5 dad29cac43 feat(libkernel): report vm.overcommit through sysctlbyname
The mimalloc in PS5MC (PPSA99420) reads vm.overcommit at start-up and
stopped on the unsupported name. It reports FreeBSD's default, 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 14:44:48 +13:00
Dean dff25dd604 Merge pull request #5098 from p3n1cillin/claude/sysctl-hw-realmem
feat(libkernel): report hw.realmem through sysctl
2026-10-14 14:44:32 +13:00
Dean 1ebf8410a9 Merge pull request #5351 from MarcZX100/marc/fix-pathname-sysctl-eperm-5340
fix(libkernel): return EPERM before validating pathname sysctl MIB
2026-10-14 14:26:31 +13:00
p3nicillinandClaude Opus 5.5 fe54938490 feat(libkernel): report hw.realmem through sysctl
The dolphin_libretro core of RetroArch (PPSA99169) reads {CTL_HW,
HW_REALMEM} as the machine's memory size and stopped on the unsupported
MIB. It reports the same value as hw.physmem.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 14:23:55 +13:00
Dean fc1e388ed2 Merge pull request #5185 from p3n1cillin/claude/sysconf-clk-tck
feat(libkernel): report _SC_CLK_TCK through sysconf
2026-10-14 14:22:06 +13:00
Hussein Kadhim 091438f99b fix(libkernel): fail sysctl with ENOTDIR when a leaf MIB has a trailing component
FreeBSD sysctl_find_oid returns ENOTDIR when the MIB continues below a leaf object. The supported hw.ncpu, hw.model, hw.physmem and kern.arandom MIBs threw an unsupported MIB error instead.

(cherry picked from commit 6968aea8af578c4d56dc614cbe449274bb6e76e7)
2026-10-13 21:33:25 +00:00
Hussein Kadhim 2096410b29 fix(libkernel): report EPERM before EINVAL when writing kern.proc.pathname
FreeBSD sysctl_root rejects a write to a read-only node with EPERM before the node handler checks the MIB length, so a write with a short or long kern.proc.pathname MIB fails with EPERM. sysctlbyname for kern.proc.pathname now goes through sysctl with its 3-component MIB so it follows the same order.
2026-10-13 17:39:56 +00:00
p3nicillinandClaude Opus 5.5 72a685b906 feat(libkernel): report _SC_CLK_TCK through sysconf
The Python in PS5MC (PPSA99420) reads sysconf(_SC_CLK_TCK) while
importing its posix module and failed with "cannot read
ticks_per_second". It returns FreeBSD's CLK_TCK, 128.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 14:53:24 +01:00
babyhuey d39cb2c62f feat(libkernel): report machdep.tsc_freq from sysctlbyname 2026-10-13 01:18:43 -04:00
babyhuey c69eb7027d feat(libkernel): report hw.model from sysctl 2026-10-12 16:18:42 -04:00
Zayd Zaari ed56cff790 fix(libkernel): accept measured system version record values
Preserve the leading field and bytes after the 40-byte legacy version record for the values measured in four PS5 firmware 13.42 hardware runs. Keep the emulator version policy unchanged and leave the separately proposed Prospero correction out of scope.

AI-assisted; regression tests are based on guarded hardware measurements.
2026-10-12 19:02:03 +00:00
pushkarreddyy d8b42473d7 feat(libkernel): support MIB 1.37 (kern.arandom) in sysctl 2026-10-12 12:07:45 +05:30
pushkarreddyy 726e773417 feat(libkernel): support kern.sdk_version in sysctlbyname 2026-10-12 11:53:41 +13:00
pushkarreddyy 931aaa2a7e feat(libkernel): handle sysctl queries for pathname, physmem and cacheline size 2026-10-12 00:17:14 +02:00
Hannah Lyons 04835bdcd1 feat(libkernel): support kern.rng_pseudo in sysctlbyname 2026-10-11 09:51:22 +02:00
MarcZX100 d8ba169df8 fix(libkernel): correct system version ABI layout 2026-10-11 09:43:02 +02:00
pushkarreddyy cbacc46ede fix(libkernel): return SCE_KERNEL_ERROR codes in sceKernelGetSystemSwVersion 2026-10-11 09:42:49 +02:00
pushkarreddyy 5890160278 feat(libkernel): implement sceKernelGetSystemSwVersion
(cherry picked from commit 7143d0b46e)
2026-10-11 09:42:49 +02:00
LeandroLP23andClaude Opus 5.5 a3f0120da2 feat(libkernel): export environ as an empty environment
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 23:22:58 +02:00
overlordxrz-source 18798620e8 feat(libkernel): implement sysctl and sysctlbyname for hw.ncpu
ScreenTester5 (PPSA69420) stops at start-up on the unresolved sysctlbyname
import and also imports sysctl. hw.ncpu (CTL_HW.HW_NCPU) reports the same
processor count as sysconf(_SC_NPROCESSORS_ONLN). Other names and MIBs throw.
2026-10-08 12:23:05 -04:00
SamG-Coder cbd22dd854 feat(kernel): implement guest system configuration queries 2026-09-25 06:25:16 +10:00