feat(libkernel): add execve as a throwing export #4105
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4105"
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 MarcZX10 on 2026-10-11T23:22:17Z.
What
Adds the missing
execveexport as an explicit unsupported-operation throw, matchingexecvpwhile process-image replacement is not modeled. This removes the unverified argument and path checks and does not changeexecv.guest_execvpretains itsexecvpchecks and verifies thatexecvethrows. The debt entry records that console behavior for argument and path errors is unknown. No title unblock is claimed.Tested
Linux x86-64, GCC 12.2.0, CMake/Ninja Release:
guest_execvp_tests.guest_execvppassed (1/1).tools/check_conventions.py --base upstream/mainpassed.git diff --checkpassed.execve; the only matching export was this PR.Not tested on Windows, a console, or a title.
Checklist
main; no other open PR implements the same functionImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T23:22:37Z.
Progress report (
a252fcd→cdf4b17)📉 System libraries: 87.98% (-0.02%, +1 declared functions)
🆕 1 declared as stubs
execve_nid_postfixImported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-11T23:22:41Z.
Local Linux validation is complete: GCC 12.2.0 Release/Ninja built
guest_execvp_tests, and CTestguest_execvppassed 1/1. The conventions check andgit diff --checkalso pass on current main. GitHub eligibility and intake checks pass; the remaining CI jobs are pending.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-12T08:25:20Z.
Does PPSA97358 stop on the
execveimport on main? #3558 calls it a predicted stop, not one seen in a run; please quote the line. If it does, a throwingexecvelikeexecvpon main is enough: no title reaches the checks inexecutableError(itsforkreturnsENOSYS), so please drop them and leaveexecvas it is.Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-12T20:40:49Z.
Windows test of head
6f50566f4merged onto currentmain(fa0cc752a, clean merge; built together with four other open PRs, so the run is for the combination): Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release, full build 0 errors,-j2.guest_execvp(the test this PR changes) passes. The seven tests of the five PRs (guest_coredump_user_data,guest_np_web_api2,guest_execvp,guest_math,guest_wide_conversion,guest_wide_strings,guest_character) all pass.Not checked: that the test fails without the change, Linux, a title run.
AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-13T07:49:40Z.
I cannot confirm that PPSA97358 stops at
execve: #3558 records a predicted stop, and I do not have a current-main run or the requested unresolved-import log line. The Windows report above covers theguest_execvptest, not a title run. I therefore cannot claim this PR unblocks PPSA97358; I have not changed the PR on that unsupported assumption.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-13T10:53:55Z.
Review: CHANGES_REQUESTED
Thanks for the carry. Dean's request from 2026-10-12 is still open, and the extra logic has no evidence behind it:
executableError(core/libs/prx/libkernel/System/src/Process.cpp:172-187) adds EFAULT/ENOENT/ENOTDIR/EACCES, PATH_MAX and ARG_MAX handling. No title reaches it: theexecvcallers cited run in aforkchild, andforkreturnsENOSYS. Please drop it.execvas it is on main and makeexecvea plain throwing export likeexecvp(NotImplemented_nid_no_patch("execve: executable replacement")), withguest_execvpcovering only that throw.execveimport for PPSA97358 (loader log or import table), add it to the PR body. #3558 only predicts it, so the body should not say this unblocks the title.docs/dev/debt/libkernel.mdline to match the smaller change.Happy to re-review once pushed.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-13T11:30:55Z.
Implemented the requested narrowing in
c73a09d58, rebased on currentmain(5d50886ee). The PR now adds only theexecvethrowing export; it removes theexecvchange and the unverified argument/path checks.guest_execvpretains the existingexecvpchecks and verifies theexecvethrow. I also removed the unsupported title-unblock claim and updated the debt entry.On Linux x86-64 with GCC 12.2.0,
guest_execvp_testsbuilds and CTestguest_execvppasses (1/1). Conventions, test registration (18/18), and whitespace checks pass. No Windows, console, or title run was performed.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-13T12:15:26Z.
@adriadam10 I pushed the requested narrowing and updated the regression, debt entry, and PR description. The Linux
guest_execvptest, conventions, test registration, and diff checks pass on the current head. When convenient, please re-review.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-13T13:21:03Z.
Review: APPROVED
Thanks for narrowing it. One thing was off: the diff renamed
execv_nid_postfixtoexecve_nid_postfix, soexecvwas removed frommain(and its debt line), although the description says it is unchanged. I added these as commits on your branch:execvexport inProcess.cppand its line indocs/dev/debt/libkernel.md;guest_execvpnow also checks thatexecvthrows;main.Built and ran the libkernel/libs ctest scope on the merged tree (146 tests, green;
guest_execvppasses). Merging once the full Build is green.Imported from boykopovar/AnyPS5. Originally posted by p3n1cillin on 2026-10-13T14:10:57Z.
Title run with this PR: Windows 11, MinGW GCC 15.2.0 (WinLibs), Release. Built on
main3faa9cb40merged with this PR and the other open PRs that the catalog titles need (#4377, #4379, #4374, #4383, #3798, #4863, #4105, my #5013/#5061/#5078/#5098/#5009 and the carries #5183/#5186, plus screamm'schrootbranch from #3632); every title converted from its catalog release,eboot.binkept inapp0, 60 s runs.getrlimit: unsupported resource 8(#5187) and after that on the fixed 0x400000 GOT read of #4013.AI-assisted (Claude Code).