libkernel: wait is absent and getrlimit throws for every resource but RLIMIT_DATA (PS5MC, XPSemu); branch ready #3733
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 screamm on 2026-10-11T16:12:12Z.
libkernel lacks
wait(ldVb3lc75PE), andgetrlimitanswers onlyRLIMIT_DATAand throws for every other resource. PS5MC (PPSA99420) importswait(registry index 460, predictedFAIL: unresolved ELF import ldVb3lc75PE from libkernel.prx) and callsgetrlimit(RLIMIT_CORE)at seven sites (predictedwhat(): getrlimit: unsupported resource 4); XPSemu (PPSA97358) asks forRLIMIT_NOFILEinos_setup_limitsand only warns on failure.Branch ready:
screamm:feat/libkernel-wait-rlimits(two commits onmaina11c8f7f, head2be0c705:feat(libkernel): implement wait,feat(libkernel): answer getrlimit for the FreeBSD-defined resources). I cannot open it as a PR because of the intake check; anyone eligible is welcome to carry it, keeping the commits as they are. It conflicts textually with #3650 and withscreamm:feat/libkernel-exec-setuid(#3558) only in themain()ofGuestGetrlimit.cpp; #3558'ssetrlimitrule (succeed when the request equals whatgetrlimitreports) would then also apply to the newly answered resources.wait(status)calls the existingwaitpid(-1, status, 0):-1/ECHILDwith the status untouched, as FreeBSD 11.4lib/libc/gen/wait.coverkern_wait6(8c639945) does when there are no children.getrlimitnow returnsRLIM_INFINITYfor both limits ofRLIMIT_CPU,FSIZE,CORE,SBSIZE,VMEM/AS,NPTS,SWAP,KQUEUESandUMTXP, the process-0 defaults in FreeBSDsys/kern/init_main.cproc0_initthat every process inherits;RLIMIT_DATAstill mirrors the host;EINVAL/EFAULTas before.STACK,NPROCandNOFILE(from themaxssiz/maxproc/maxfilestunables) andRSS/MEMLOCK(derived from free memory at boot) keep throwing because no public source gives the console's values; all recorded in TechnicalDebt.guest_waitpidandguest_getrlimitpin the behaviour (nine answered values,EFAULTfor each,EINVAL, the five throws).Tested on Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release,
BUILD_TESTING=ON, full build includinglibs: both tests 3/3;ctest -j8 -E "^agc_driver_|^video_out_flip"532/536, the failures being the knownwindows_exceptions(#3411, fixed by #3415),guest_kernel_sys(#3510) andguest_filesystem(#3518) plus theguest_ampr_markersflake (#3371); withmain'sProcess.cppboth extended tests fail;tools/check_conventions.py --base mainandgit diff --checkpass. Not run on Linux.Written with Claude Code assistance (implementation by a subagent, reviewed and validated in this session).