feat(libkernel): answer getrlimit for FreeBSD resources #3765
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3765"
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 pushkarreddyy on 2026-10-11T16:35:14Z.
What
This pull request implements FreeBSD 11 process-0 baseline resource limits in getrlimit within libkernel:
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T16:37:03Z.
Review: DISMISSED
Thanks. The
getrlimitpart checks out: the nine values match FreeBSD 11.4proc0_init(sys/kern/init_main.c, all limits start atRLIM_INFINITY; only NOFILE/NPROC/DATA/STACK/RSS/MEMLOCK are overridden, and those are the ones you keep throwing). Tests pass locally and fail without the change.One blocker:
wait(Process.cpp:293,GuestWaitpid.cpp:14-23, thewait and waitpidTechnicalDebt line) is already implemented by the open #3715 (same forwarding towaitpid(-1, status, 0), same test), opened earlier. CONTRIBUTING doesn't allow two open PRs implementing the same function.Please drop the
waitparts and keep this PR togetrlimit(restore the originalwaitpidTechnicalDebt line, add only thegetrlimitone, and update the title/body, with "Depends on: none"). It can then be merged independently of #3715.Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-11T16:41:39Z.
Implementation Details & Expedited Testing Request
Hi @adriadam10, @MarcZX100, @blawesom,
This PR directly addresses the start-up crashes across PS5MC (PPSA99420), XPSemu (PPSA97358), and VLC (PPSA85300) as reported in #3733:
wait(status) (ldVb3lc75PE):
getrlimit Process-0 FreeBSD Baseline Defaults:
Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-11T16:47:43Z.
Clean Scope Update
To maintain strict one-topic focus and avoid any duplicate export collisions with @Lorkydey's PR #3715 (which exports wait), this PR has been narrowed purely to getrlimit (eat(libkernel): answer getrlimit for FreeBSD resources):
Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-11T16:51:08Z.
Hi @adriadam10,
Thank you for the review and confirmation on the FreeBSD 11.4 proc0_init values!
I have addressed the blocker exactly as requested:
Ready for re-review and merge. Thank you!
Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-12T02:09:34Z.
Hi @adriadam10 and @oneandonlydean,
Rebased cleanly onto latest origin/main (
d371ed307) on commit d051126d:Branch is clean (mergeable: true) and ready for review and merge when convenient! Thank you!
Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-12T07:50:25Z.
Hi @adriadam10, following up on your earlier review: as requested, wait was completely removed to avoid overlap with #3715, and this PR is now strictly scoped to the 9 FreeBSD process-0 getrlimit defaults (RLIMIT_CPU, FSIZE, CORE, SBSIZE, VMEM, NPTS, SWAP, KQUEUES, UMTXP). Rebased cleanly on latest main with all 14 CI checks passing (mergeable: true). Whenever you have a chance to re-review, thank you!