Repository navigation
feat(libkernel): add execve as a throwing export - #4105
Conversation
|
Local Linux validation is complete: GCC 12.2.0 Release/Ninja built |
|
Does PPSA97358 stop on the |
970d177 to
62a769b
Compare
62a769b to
6f50566
Compare
|
Windows test of head
Not checked: that the test fails without the change, Linux, a title run. AI-assisted (Claude Code). |
|
I cannot confirm that PPSA97358 stops at |
adriadam10
left a comment
There was a problem hiding this comment.
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.- Leave
execvas it is on main and makeexecvea plain throwing export likeexecvp(NotImplemented_nid_no_patch("execve: executable replacement")), withguest_execvpcovering only that throw. - If you can quote the unresolved
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. - Update the
docs/dev/debt/libkernel.mdline to match the smaller change.
Happy to re-review once pushed.
6f50566 to
c73a09d
Compare
|
Implemented the requested narrowing in On Linux x86-64 with GCC 12.2.0, |
|
@adriadam10 I pushed the requested narrowing and updated the regression, debt entry, and PR description. The Linux |
XPSemu PPSA97358 imports both from libkernel.prx; with the imports ahead of them covered, its predicted next stops (relink registry order, not an observed run) are: FAIL: unresolved ELF import KaK52lYTBIs from libkernel.prx (execv, 7 call sites) FAIL: unresolved ELF import kdguLiAheLI from libkernel.prx (execve, 4 call sites) Today the title stops earlier at the observed FAIL: unresolved ELF import aRo9AhFUXcM from libkernel.prx (sigsetjmp, merged in boykopovar#3486) As for execvp (boykopovar#2827), the process image cannot be replaced here, so both throw with the execvp message pattern once FreeBSD 11's execve would start loading the image (freebsd-src 8c639945, sys/kern/kern_exec.c exec_copyin_args, do_execve, exec_check_permissions; lib/libc/gen/exec.c execv passes environ). Before that they fail as FreeBSD does: EFAULT for a null argument vector or path, ENOENT and ENOTDIR from the lookup as stat reports it, EACCES for a path that is not a regular file. Paths of PATH_MAX bytes or more and strings over ARG_MAX throw instead of guessing the console's limits. The execv calls in XPSemu's sources run in a fork child (net/tap.c), and its fork fails with ENOSYS (ZiZc3/XPSemu 8eec07b4, ps5/compat/libc_missing.c, ps5/build-title.sh --defsym). NIDs computed with tools/nid_names.py and confirmed in aerolib. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> (cherry picked from commit 57f0fa3)
The rename to execve dropped execv, which PPSA97358 imports. Co-Authored-By: Claude <noreply@anthropic.com>
c73a09d to
cdf4b17
Compare
adriadam10
left a comment
There was a problem hiding this comment.
Thanks for narrowing it. One thing was off: the diff renamed execv_nid_postfix to execve_nid_postfix, so execv was removed from main (and its debt line), although the description says it is unchanged. I added these as commits on your branch:
- restored the throwing
execvexport inProcess.cppand its line indocs/dev/debt/libkernel.md; guest_execvpnow also checks thatexecvthrows;- rebased on current
main.
Built and ran the libkernel/libs ctest scope on the merged tree (146 tests, green; guest_execvp passes). Merging once the full Build is green.
|
Title run with this PR: Windows 11, MinGW GCC 15.2.0 (WinLibs), Release. Built on
AI-assisted (Claude Code). |
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 function