feat(libkernel): add process, path and clock exports #3654

Closed
MarcZX10 wants to merge 6 commits from upstream-pr/3654 into main
MarcZX10 commented 2026-10-11 14:54:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-11T14:54:17Z.


What

Carries the four commits from David’s ready branch linked in issue #3632, preserving his authorship. Adds getpriority, chflags, chroot, and clock_settime for the predicted PS5MC and Porpoise import stops. The issue records the pinned FreeBSD 11.4 references and the behavior each export can support.

The implementation follows the FreeBSD error checks where the relevant guest state is known. getpriority reports nice 0 for the single guest process and throws for unknown priority identities; chflags and chroot resolve guest paths and return lookup errors, then throw when the host cannot reproduce the requested state; valid CLOCK_REALTIME updates throw instead of changing the host clock. The limitations and unverified console details are recorded in TechnicalDebt. These title stops remain predicted; no title run has observed them.

This is independent of #3650. I kept the Process.cpp and TechnicalDebt changes in separate hunks and verified Git can merge both branches without conflicts.

Tested

  • Linux, GCC 12.2, Release: built the affected targets and tests; guest_sched_priority, guest_filesystem, guest_kernel_sys, and guest_freebsd_clocks passed 4/4.
  • python3 tools/check_conventions.py --base upstream/main and git diff --check upstream/main...HEAD passed.
  • The issue author reports a Windows 11 Pro 26220 / WinLibs GCC 15.2.0 Release full build and neighboring test-suite results in #3632. I did not independently run Windows or a title.

Checklist

  • Based on current main; no other open PR implements these functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4819938631 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3654). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-11T14:54:17Z. --- ### What Carries the four commits from David’s ready branch linked in [issue #3632](https://github.com/boykopovar/AnyPS5/issues/3632), preserving his authorship. Adds `getpriority`, `chflags`, `chroot`, and `clock_settime` for the predicted PS5MC and Porpoise import stops. The issue records the pinned FreeBSD 11.4 references and the behavior each export can support. The implementation follows the FreeBSD error checks where the relevant guest state is known. `getpriority` reports nice 0 for the single guest process and throws for unknown priority identities; `chflags` and `chroot` resolve guest paths and return lookup errors, then throw when the host cannot reproduce the requested state; valid `CLOCK_REALTIME` updates throw instead of changing the host clock. The limitations and unverified console details are recorded in TechnicalDebt. These title stops remain predicted; no title run has observed them. This is independent of #3650. I kept the `Process.cpp` and TechnicalDebt changes in separate hunks and verified Git can merge both branches without conflicts. ### Tested - Linux, GCC 12.2, Release: built the affected targets and tests; `guest_sched_priority`, `guest_filesystem`, `guest_kernel_sys`, and `guest_freebsd_clocks` passed 4/4. - `python3 tools/check_conventions.py --base upstream/main` and `git diff --check upstream/main...HEAD` passed. - The issue author reports a Windows 11 Pro 26220 / WinLibs GCC 15.2.0 Release full build and neighboring test-suite results in [#3632](https://github.com/boykopovar/AnyPS5/issues/3632). I did not independently run Windows or a title. ### Checklist - [x] Based on current `main`; no other open PR implements these functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-11 14:54:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T14:54:38Z.


Progress report (a11c8f7 → 1ab09ca)

📈 System libraries: 85.83% (+0.02%, +4 implemented functions)

✅ 4 implemented
Library Name
libkernel chflags_nid_postfix
libkernel clock_settime_nid_postfix
libkernel getpriority_nid_postfix
libkernel_sys chroot_nid_postfix
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6110288853 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3654#issuecomment-6110288853). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-11T14:54:38Z. --- <!-- progress-report --> ### Progress report (a11c8f7 → 1ab09ca) 📈 **System libraries**: 85.83% (+0.02%, +4 implemented functions) <details> <summary>✅ 4 implemented</summary> | Library | Name | | - | - | | libkernel | `chflags_nid_postfix` | | libkernel | `clock_settime_nid_postfix` | | libkernel | `getpriority_nid_postfix` | | libkernel_sys | `chroot_nid_postfix` | </details>
blawesom commented 2026-10-11 15:19:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-11T15:19:36Z.


Independent pre-review on Linux (full CI runs only happen on manual trigger, so recording one): CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, BUILD_TESTING=ON.

  • Builds; tools/check_conventions.py --base origin/main passes.
  • Full suite: 832/832 passed (all tests including the Vulkan suites on AMD RX 9070 XT / RADV).
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6110516187 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3654#issuecomment-6110516187). Originally posted by [blawesom](https://github.com/blawesom) on 2026-10-11T15:19:36Z. --- Independent pre-review on **Linux** (full CI runs only happen on manual trigger, so recording one): CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, `BUILD_TESTING=ON`. - Builds; `tools/check_conventions.py --base origin/main` passes. - Full suite: **832/832 passed** (all tests including the Vulkan suites on AMD RX 9070 XT / RADV).
oneandonlydean commented 2026-10-11 23:58:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-11T23:58:39Z.


Same as #3651: getpriority, chflags, chroot and clock_settime are predicted stops only, and three of them throw once the arguments are valid. Reopen when a title run stops at one, one function per PR.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6115348920 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3654#issuecomment-6115348920). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-11T23:58:39Z. --- Same as #3651: `getpriority`, `chflags`, `chroot` and `clock_settime` are predicted stops only, and three of them throw once the arguments are valid. Reopen when a title run stops at one, one function per PR.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!3654
No description provided.