libkernel: getpriority, chflags, chroot and clock_settime are absent (PS5MC, Porpoise); branch ready #3632
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-11T14:28:59Z.
libkernel/libkernel_sys lack
getpriority(miQ1wVwSexE),chflags(ixrw0h2tWuI),chroot(AKknh8Cx-V8, libkernel_sys) andclock_settime(d7nUj1LOdDU). From the relink registry order they are predicted stops of PS5MC (PPSA99420, indices 449, 450, 480) and Porpoise (PPSA99764,chrootat 346); not yet observed in a run.Branch ready:
screamm:feat/libkernel-ps5mc-set(four commits onmaina11c8f7f, head43dc8bc4e:63262245getpriority,16e5b7ccchflags,32f46bd9chroot, then clock_settime). 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. FreeBSD source pin 11.48c639945.getpriority(which, who)(kern_resource.c): the guest is one process at nice 0 leading its own group (askill/setsidassume): 0 for the caller by process, group or user (id 0 or its own),ESRCHfor other ids,EINVALfor an unknownwhich; errno is not cleared on success, as FreeBSD's libc leaves it.chflags(path, flags)(kern_chflagsat, UFSufs_setattr): resolved through the guest resolver likechmod;EFAULT/ENOENT/ENOTDIRfrom the lookup, unknown bitsEOPNOTSUPP(UFS),SF_SNAPSHOTEPERM, flags 0 succeed, any other valid flag throws naming it (UF_READONLYis deliberately not mapped to the Windows read-only attribute, which already carrieschmod's owner write bit, and Linux has no unprivileged equivalent).chroot(path)(sys_chroot,change_dir):EFAULT,ENOENT,ENOTDIR; any found directory throws naming it, because the resolver's root is fixed and the mount aliases are host paths.clock_settime(clock, ts)(kern_clock_settime):EFAULTfor a null time,EINVALfor a non-realtime clock or an out-of-range time; a valid request throws naming the requested time (the host clock is never set).guest_sched_priorityandguest_freebsd_clocksgain the cases; thechflagsandchrootcases sit inguest_filesystem/guest_kernel_sys, which on this host still stop earlier on the knownmainproblems (#3518 directory time, #3510 symlink) and pass 3/3 with those cases bypassed.Tested on Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release,
BUILD_TESTING=ON, full build includinglibs: the two runnable tests 3/3;ctest -j8 -E "^agc_driver_|^video_out_flip"533/536, the failures being the knownwindows_exceptions(#3411),guest_kernel_sys(#3510) andguest_filesystem(#3518); withmain'sProcess.cppthe extended priority test fails;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).
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-11T14:54:23Z.
I carried all four commits from David’s ready branch into PR #3654, preserving his authorship. The Linux/GCC 12.2 Release tests pass for
guest_sched_priority,guest_filesystem,guest_kernel_sys, andguest_freebsd_clocks; conventions andgit diff --checkalso pass on currentmain. The predicted PS5MC/Porpoise stops have not been confirmed in a title run. The PR is independent of #3650; I kept their shared-file changes in separate hunks and verified the branches merge cleanly.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-12T08:30:25Z.
I carried the
chrootportion of the ready branch into PR #4384, preserving David’s original commit author. The focused Linux Releaseguest_kernel_systest passed 1/1, and conventions/diff checks passed. Existing directories return an explicit unsupported-root-change error; invalid and missing paths retain the guest lookup errors.Imported from boykopovar/AnyPS5. Originally posted by screamm on 2026-10-13T10:34:05Z.
Porpoise (PPSA99764) now reaches
chrootonmain: fifth catalog run,FAIL: unresolved ELF import AKknh8Cx-V8 from libkernel_sys.prx(exit 0xC0000139 at load). Branch ready:screamm:feat/libkernel-sys-chroot(two commits onmain77b9f727:059d98cfthe chroot commit from this issue's branch,15f673eefeat(libkernel_sys): let chroot keep the guest root). Anyone eligible is welcome to carry it, keeping the commits as they are.2ed1ab5a,src/porpoise_jailbreak.cppput_root_back): it weak-importschroot, and its one call isfchdir(g_sandbox_root)thenchroot(".")withg_sandbox_roota descriptor of/opened at start, followed bychdir("/"); it only ever restores the root it started with. So, following FreeBSD 11.4sys_chroot/pwd_chroot(8c639945), a chroot to the current guest root succeeds and changes nothing (/,/..,//./,..from a top-level directory, thefchdir+chroot(".")pattern); the lookup errors stay (EFAULT,ENOENT,ENOTDIRincludingfile/.., andENAMETOOLONGwithpathconf's rules); any other directory still throws naming the path, because the resolver's root is fixed. Recorded indocs/dev/debt/libkernel_sys.md: the console refuseschrootwithEPERMfrom a sandbox while a directory is open, and whether a title holds the privilege at all, are not modelled.guest_kernel_sysgains the lookup errors, Porpoise's exact pattern with the descriptor open,getcwdunchanged afterchroot, relative and absolute opens and..escapes still resolving under the root, and the throw for another directory.Tested on Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release,
BUILD_TESTING=ON, full build includinglibs:guest_kernel_sys,guest_working_directory,guest_realpath3/3;ctest -j8 -E "^agc_driver_|^video_out_flip"685/689 under host load, the four (guest_file_lock_process,guest_raise_exception,tls_function_coverage_register_address_loads,conventions_function_bodies) passing when rerun serially; withmain'slibkernel_sys/Export.cppthe extended test fails; conventions andgit diff --checkpass. Porpoise relinked against this build gets past the import, creates its swapchain and stops at 3.5 s onwhat(): VideoOut: port already open(#4863). Not run on Linux.Written with Claude Code assistance (implementation by a subagent, reviewed and validated in this session).
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-14T00:09:24Z.
All four are on main now:
getpriority#4374,chflags#4379,chroot#5191,clock_settime#5183. Closing; comment here if PS5MC or Porpoise still stops on one of them.