fix(libSceLibcInternal): export sigvec through shared runtime #10953

Merged
AZLisme merged 1 commit from upstream-pr/10953 into main 2026-11-02 10:25:29 +00:00
AZLisme commented 2026-10-25 11:20:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by AZLisme on 2026-10-25T11:20:37Z.


What

Implement native libSceLibcInternal sigvec (yhxKO9LYc8A) and preserve libc compatibility. Each patched module owns its public NID and calls one unique private libc conversion core with shared sigaction registration state. Distinct existing host aliases avoid the libc preserve-export-list collision without changing patcher policy or forwarding through the public NID. One canonical shared header supplies the 16-byte vector ABI and typed declarations.

Conversion retains the low mask word, flags XOR 2, null combinations, input/output aliasing and forwarded results. Complete previous-vector HostWrite is checked before backend mutation; rejection returns EFAULT without partial output or disposition changes. Missing backend registration throws runtime_error. Independent kernel registration keeps #10749's siginterrupt ownership separate.

Credit BunnyFl's firmware 13.42 report for identifying Internal as the native owner and checking ABI/conversion by executing firmware code under an emulator with recording imports. This was not a physical-console measurement. The source contract follows pinned FreeBSD 11.4 sigcompat.c; inherited signal-backend gaps remain in debt.

The standalone native fixture loads the actual patched modules without guest-runtime startup links, checks module ownership and cold registration, then loads its exception probe. The mixed-ABI source has final no-exceptions/no-asynchronous-unwind options, while utility sources retain native MinGW unwind tables/static runtimes. Windows images are explicitly pinned until process exit while original LoadLibrary references still receive FreeLibrary. Separate child processes retain both cold load orders. Explicit DLL unloading remains outside the fixture; the earlier unload crash's cause is unknown.

Rebased as 581d45c28237 onto main aebeaa53f54d. The final implementation, canonical ABI, positional CMake wrapper and fixtures are preserved. The debt conflict retains upstream frexpf and the remaining SIG gaps; sigblock/sigsetmask remain deferred.

Tested

2026-11-01 UTC manual review of four overlap leads (source only)

Reviewed these frozen foreign heads against this PR's e7725d7111d0aaa2cc04729dae0a5be9ab485ce8, using its authored delta from 26fa1212b82f76dd49cf12d65e445d6ff3e0844c and each foreign topic's actual authored merge-base. Inherited main changes were excluded from topic comparisons.

PR Exact reviewed head Bounded source finding
#9019 79b02b3bdbb4301d6f7638d8026b4374b7e22803 Typed pwrite uses the existing shared POSIX provider; its NID C2kJ-byS5rM differs from sigvec. Shared kernel CMake edits split Windows named-memory tests, separate from SIG production registration.
#10987 fe748d4f48743f437bb180bc0f3731a4a07fbe3a Windows timezone-name UTF-8 conversion adds no guest export or SIG route; its libc debt entry is separate from sigvec.
#12841 e908061e3243c54655215bec7d156276baa4cb6c Typed asctime_r has distinct NID 488p6whx47U; shared libc API/debt edits commute with the SIG edits on the pinned own parent, preserving SIG declarations and debt.
#14299 f9474c5040b453603ae1a07668607e022812363b Typed _execve/_execvpe exports have distinct NIDs; the shared process provider is unchanged. Kernel CMake changes exec tests, separate from SIG production registration.

No current owned export/new-file collision, source fix, rebase or new dependency is supported by these exact inputs. Future shared CMake/API/debt integration must preserve both topics and inherited entries. For #9019, complete raw CMake/debt hunks have inherited context mismatches; exact-span preservation and selected-hunk commutation are bounded source checks, not a full Git union. Foreign mergeable=false and the bot's later-main compare link establish no owned conflict or rebase requirement. Future foreign head changes require fresh review.

No new tests, builds or branch changes occurred. This review adds no full composition, current-main, runtime or native qualification. Existing CI/review/integration requirements, SDK/native ABI, default SIGPIPE, context behavior, module-order and unload holds remain; all earlier results retain their stated scope.

2026-11-01 Windows CI: run 41295117301, e7725d7111d0aaa2cc04729dae0a5be9ab485ce8 + main 26fa1212b82f76dd49cf12d65e445d6ff3e0844c: 1,679 selected CTests passed, 904 skipped, zero failed. guest_sigvec and guest_signals passed; guest_sigvec_modules compiled but did not run. Separate matrix jobs passed 549 Linux/552 Windows relinker cases, 34 ASan TLS cases and 25 macOS write-watch cases repeated three times. Windows general full-suite, skip-audit and header CTests were not run. Native context, module/unload and existing dependency gates remain.

2026-11-01: preserving rebase e7725d7111d0aaa2cc04729dae0a5be9ab485ce8 onto fixed main 26fa1212b82f76dd49cf12d65e445d6ff3e0844c. Linux GCC 16.2.1 Release: baseline 61 plain + 4 logging-enabled runtime CTests; private SIG-plus-six-ICU union 4908848dab02fb1f0a9fad7e9525ddb8a628177a 71 + 6. All passed, with 65 public-header tests per side. Relevant: guest_sigvec, guest_sigvec_modules. Scope is this fixed baseline/private composition; bare heads, later main, Windows, native ABI and unloading remain unqualified. Earlier results retain their original scope.

Fresh fixed-main Linux validation on 0362b1521c4e and private SIG+all-six-ICU composition 8a5c8c499f0e: baseline passed 53 plain runtime CTests, four with logging enabled and 65 public-header checks; composition passed 63, six and 65 respectively, with zero failures, skips or NotRun cases. Both SIG fixtures passed plain and with logging enabled, including both requested native module-open orders. The published head remains 581d45c28237. This qualifies selected cases on that fixed private composition; full CI, later main, Windows/macOS, native signal context and provider unload remain outside this new run.

Native Windows: ycbuzi reports current head 581d45c282 merged cleanly with main c547deaacb (reported merge fa54b0eba1), Windows 11 Home 10.0.26200 / WinLibs GCC 15.2.0 r7 (MinGW-w64 UCRT), Release, BUILD_TESTING=ON. The seven named targets (libc, libkernel, libSceLibcInternal, nid_patcher, sigvec_modules_exceptions, guest_sigvec_tests, guest_sigvec_modules_tests) built, and both guest_sigvec and guest_sigvec_modules passed two repetitions with ctest --repeat until-fail:2. This is attributed focused contributor validation, not local reproduction or full maintainer CI. No negative control, full-suite, five-PR-union, macOS or title run was reported.

Fresh normal-root Linux Release build at 581d45c28237 / base aebeaa53f54d: all 68 selected CTests passed with zero failures or skips: guest_sigvec, guest_sigvec_modules, guest_exit_order and 65 public-header checks. Both Internal-first and libc-first child processes passed module ownership, shared conversion/callback state, exception and guest-output assertions. Independent source, build-input, artifact and runtime review passed.

Conventions and whitespace checks passed. Static integration with current main 801d5b9bc110 is clean; that later-main union was not run.

Earlier maintainer Linux/Windows CI applies to the ordered five-PR union (#10953, #11137, #10995, #11165 and #11219) containing e0382c66298e on main b986c11a344e. Earlier native Windows contributor results apply to b397eedc42 with main 2cce8bc51d: Windows 11, WinLibs GCC 15.2.0 r7, Release, both SIG fixtures passed three repetitions. These results remain historical. Current-head full maintainer CI remains pending; focused Windows contributor validation is recorded above. No title, physical PS5 or macOS run is claimed.

Checklist

  • Based on current main; no other open PR implements the same 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 under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5004243056 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10953). Originally posted by [AZLisme](https://github.com/AZLisme) on 2026-10-25T11:20:37Z. --- ### What Implement native `libSceLibcInternal` `sigvec` (`yhxKO9LYc8A`) and preserve libc compatibility. Each patched module owns its public NID and calls one unique private libc conversion core with shared sigaction registration state. Distinct existing host aliases avoid the libc preserve-export-list collision without changing patcher policy or forwarding through the public NID. One canonical shared header supplies the 16-byte vector ABI and typed declarations. Conversion retains the low mask word, flags XOR 2, null combinations, input/output aliasing and forwarded results. Complete previous-vector HostWrite is checked before backend mutation; rejection returns EFAULT without partial output or disposition changes. Missing backend registration throws runtime_error. Independent kernel registration keeps #10749's siginterrupt ownership separate. Credit BunnyFl's [firmware 13.42 report](https://github.com/boykopovar/AnyPS5/pull/10953#issuecomment-6399264971) for identifying Internal as the native owner and checking ABI/conversion by executing firmware code under an emulator with recording imports. This was not a physical-console measurement. The source contract follows pinned FreeBSD 11.4 sigcompat.c; inherited signal-backend gaps remain in debt. The standalone native fixture loads the actual patched modules without guest-runtime startup links, checks module ownership and cold registration, then loads its exception probe. The mixed-ABI source has final no-exceptions/no-asynchronous-unwind options, while utility sources retain native MinGW unwind tables/static runtimes. Windows images are explicitly pinned until process exit while original LoadLibrary references still receive FreeLibrary. Separate child processes retain both cold load orders. Explicit DLL unloading remains outside the fixture; the earlier unload crash's cause is unknown. Rebased as `581d45c28237` onto main `aebeaa53f54d`. The final implementation, canonical ABI, positional CMake wrapper and fixtures are preserved. The debt conflict retains upstream `frexpf` and the remaining SIG gaps; `sigblock`/`sigsetmask` remain deferred. ### Tested <details> <summary>2026-11-01 UTC manual review of four overlap leads (source only)</summary> Reviewed these frozen foreign heads against this PR's `e7725d7111d0aaa2cc04729dae0a5be9ab485ce8`, using its authored delta from `26fa1212b82f76dd49cf12d65e445d6ff3e0844c` and each foreign topic's actual authored merge-base. Inherited main changes were excluded from topic comparisons. | PR | Exact reviewed head | Bounded source finding | | --- | --- | --- | | #9019 | `79b02b3bdbb4301d6f7638d8026b4374b7e22803` | Typed `pwrite` uses the existing shared POSIX provider; its NID `C2kJ-byS5rM` differs from `sigvec`. Shared kernel CMake edits split Windows named-memory tests, separate from SIG production registration. | | #10987 | `fe748d4f48743f437bb180bc0f3731a4a07fbe3a` | Windows timezone-name UTF-8 conversion adds no guest export or SIG route; its libc debt entry is separate from `sigvec`. | | #12841 | `e908061e3243c54655215bec7d156276baa4cb6c` | Typed `asctime_r` has distinct NID `488p6whx47U`; shared libc API/debt edits commute with the SIG edits on the pinned own parent, preserving SIG declarations and debt. | | #14299 | `f9474c5040b453603ae1a07668607e022812363b` | Typed `_execve`/`_execvpe` exports have distinct NIDs; the shared process provider is unchanged. Kernel CMake changes exec tests, separate from SIG production registration. | No current owned export/new-file collision, source fix, rebase or new dependency is supported by these exact inputs. Future shared CMake/API/debt integration must preserve both topics and inherited entries. For #9019, complete raw CMake/debt hunks have inherited context mismatches; exact-span preservation and selected-hunk commutation are bounded source checks, not a full Git union. Foreign `mergeable=false` and the bot's later-main compare link establish no owned conflict or rebase requirement. Future foreign head changes require fresh review. No new tests, builds or branch changes occurred. This review adds no full composition, current-main, runtime or native qualification. Existing CI/review/integration requirements, SDK/native ABI, default SIGPIPE, context behavior, module-order and unload holds remain; all earlier results retain their stated scope. </details> 2026-11-01 Windows CI: [run 41295117301](https://github.com/boykopovar/AnyPS5/actions/runs/41295117301), `e7725d7111d0aaa2cc04729dae0a5be9ab485ce8` + main `26fa1212b82f76dd49cf12d65e445d6ff3e0844c`: 1,679 selected CTests passed, 904 skipped, zero failed. `guest_sigvec` and `guest_signals` passed; `guest_sigvec_modules` compiled but did not run. Separate matrix jobs passed 549 Linux/552 Windows relinker cases, 34 ASan TLS cases and 25 macOS write-watch cases repeated three times. Windows general full-suite, skip-audit and header CTests were not run. Native context, module/unload and existing dependency gates remain. 2026-11-01: preserving rebase `e7725d7111d0aaa2cc04729dae0a5be9ab485ce8` onto fixed main `26fa1212b82f76dd49cf12d65e445d6ff3e0844c`. Linux GCC 16.2.1 Release: baseline 61 plain + 4 logging-enabled runtime CTests; private SIG-plus-six-ICU union `4908848dab02fb1f0a9fad7e9525ddb8a628177a` 71 + 6. All passed, with 65 public-header tests per side. Relevant: `guest_sigvec`, `guest_sigvec_modules`. Scope is this fixed baseline/private composition; bare heads, later main, Windows, native ABI and unloading remain unqualified. Earlier results retain their original scope. Fresh fixed-main Linux validation on `0362b1521c4e` and private SIG+all-six-ICU composition `8a5c8c499f0e`: baseline passed 53 plain runtime CTests, four with logging enabled and 65 public-header checks; composition passed 63, six and 65 respectively, with zero failures, skips or NotRun cases. Both SIG fixtures passed plain and with logging enabled, including both requested native module-open orders. The published head remains `581d45c28237`. This qualifies selected cases on that fixed private composition; full CI, later main, Windows/macOS, native signal context and provider unload remain outside this new run. Native Windows: [ycbuzi reports](https://github.com/boykopovar/AnyPS5/pull/10953#issuecomment-6447656909) current head `581d45c282` merged cleanly with main `c547deaacb` (reported merge `fa54b0eba1`), Windows 11 Home 10.0.26200 / WinLibs GCC 15.2.0 r7 (MinGW-w64 UCRT), Release, `BUILD_TESTING=ON`. The seven named targets (`libc`, `libkernel`, `libSceLibcInternal`, `nid_patcher`, `sigvec_modules_exceptions`, `guest_sigvec_tests`, `guest_sigvec_modules_tests`) built, and both `guest_sigvec` and `guest_sigvec_modules` passed two repetitions with `ctest --repeat until-fail:2`. This is attributed focused contributor validation, not local reproduction or full maintainer CI. No negative control, full-suite, five-PR-union, macOS or title run was reported. Fresh normal-root Linux Release build at `581d45c28237` / base `aebeaa53f54d`: all 68 selected CTests passed with zero failures or skips: `guest_sigvec`, `guest_sigvec_modules`, `guest_exit_order` and 65 public-header checks. Both Internal-first and libc-first child processes passed module ownership, shared conversion/callback state, exception and guest-output assertions. Independent source, build-input, artifact and runtime review passed. Conventions and whitespace checks passed. Static integration with current main `801d5b9bc110` is clean; that later-main union was not run. Earlier [maintainer Linux/Windows CI](https://github.com/boykopovar/AnyPS5/actions/runs/40446565355) applies to the ordered five-PR union (#10953, #11137, #10995, #11165 and #11219) containing `e0382c66298e` on main `b986c11a344e`. Earlier [native Windows contributor results](https://github.com/boykopovar/AnyPS5/pull/10953#issuecomment-6416270241) apply to `b397eedc42` with main `2cce8bc51d`: Windows 11, WinLibs GCC 15.2.0 r7, Release, both SIG fixtures passed three repetitions. These results remain historical. Current-head full maintainer CI remains pending; focused Windows contributor validation is recorded above. No title, physical PS5 or macOS run is claimed. <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same 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 under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: <!-- #PR, or none --> none - [x] Fixes: <!-- issue it closes as Fixes #N, or none --> none - [x] Unblocks: <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> none - [x] GPUs tested: <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> n/a - [x] AI-assisted: <!-- yes / no --> yes
MarcZX10 commented 2026-10-25 11:54:22 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T11:54:22Z.

Review: CHANGES_REQUESTED


Requesting changes for the open integration conflict. The sigvec conversion itself matches the pinned FreeBSD compat-43 path, and the focused tests cover flag/mask round-trips, aliasing, invalid input and missing registration. However, I ran git merge-tree between the current #10953 head and open #10749; it reports a content conflict in core/libs/prx/libkernel/System/src/Signals.cpp. If #10749 lands first, its removal/move of the RegisterSignalsOnLoad callback setup can also drop this PR's RegisterSigvec_nid_no_patch registration unless that is explicitly carried into the new owner path.

The PR description anticipates preserving that callback, but I could not find an agreed merge order with #10749's author. Please coordinate the order/resolution with that author and record the result (and any needed Depends on entry) before approval. The submitted Linux checks pass; this is specifically about maintaining a buildable and registered integration after the shared-file conflict is resolved.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5643098564 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10953#pullrequestreview-5643098564). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-25T11:54:22Z. **Review:** CHANGES_REQUESTED --- Requesting changes for the open integration conflict. The `sigvec` conversion itself matches the pinned FreeBSD compat-43 path, and the focused tests cover flag/mask round-trips, aliasing, invalid input and missing registration. However, I ran `git merge-tree` between the current #10953 head and open #10749; it reports a content conflict in `core/libs/prx/libkernel/System/src/Signals.cpp`. If #10749 lands first, its removal/move of the `RegisterSignalsOnLoad` callback setup can also drop this PR's `RegisterSigvec_nid_no_patch` registration unless that is explicitly carried into the new owner path. The PR description anticipates preserving that callback, but I could not find an agreed merge order with #10749's author. Please coordinate the order/resolution with that author and record the result (and any needed `Depends on` entry) before approval. The submitted Linux checks pass; this is specifically about maintaining a buildable and registered integration after the shared-file conflict is resolved.
ahmadmuj commented 2026-10-25 12:07:20 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ahmadmuj on 2026-10-25T12:07:20Z.

Review: COMMENTED


Checked head fa4e8f1698fe merged onto main a5a780eaaa7f (clean merge). Linux, GCC 13.3, Release.

What I ran:

  • built guest_sigvec_tests, guest_signal_tests, guest_signal_set_tests; ctest -R '^(guest_sigvec|guest_signals|guest_signal_sets)$' is 3/3 green
  • mutation: dropping the ^ 2 on install makes guest_sigvec fail with "legacy interrupt flag reverses restart flag", so the flag loop really catches a wrong conversion
  • walked LegacySignals.cpp against FreeBSD 11.4 lib/libc/compat-43/sigcompat.c sigvec() line by line: same ^ SV_INTERRUPT both ways, empty mask plus low word on install, osv written only when ret == 0, null sv/osv passed through. Converting sv before the call also keeps the aliased case right
  • compute_nid("sigvec") from tools/nid_names.py gives yhxKO9LYc8A

One thing to change: the progress report counts sigvec as a stub (libc 1340/1351 -> 1340/1352 in the bot comment above). tools/progress.py marks any APS5_VABI body that calls NotImplemented_nid_no_patch as todo, and the missing-backend guard does that. siginterrupt handles the same missing registration with a plain throw (Process.cpp:309), which counts as done. With

if (forward == nullptr) throw std::runtime_error("sigvec: libkernel has not registered sigaction");

progress.py --module libc gives 1341 done / 11 todo with sigvec done, and guest_sigvec still passes (NotImplemented_nid_no_patch throws std::runtime_error too, so the MissingBackend catch is unchanged).

Not checked: which PS5 module exports sigvec (no dump here), Windows/macOS. The #10749 ordering question in the earlier review still stands; I didn't look into that part.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5643137212 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10953#pullrequestreview-5643137212). Originally posted by [ahmadmuj](https://github.com/ahmadmuj) on 2026-10-25T12:07:20Z. **Review:** COMMENTED --- Checked head `fa4e8f1698fe` merged onto main `a5a780eaaa7f` (clean merge). Linux, GCC 13.3, Release. What I ran: - built `guest_sigvec_tests`, `guest_signal_tests`, `guest_signal_set_tests`; `ctest -R '^(guest_sigvec|guest_signals|guest_signal_sets)$'` is 3/3 green - mutation: dropping the `^ 2` on install makes `guest_sigvec` fail with "legacy interrupt flag reverses restart flag", so the flag loop really catches a wrong conversion - walked `LegacySignals.cpp` against FreeBSD 11.4 `lib/libc/compat-43/sigcompat.c` `sigvec()` line by line: same `^ SV_INTERRUPT` both ways, empty mask plus low word on install, `osv` written only when `ret == 0`, null `sv`/`osv` passed through. Converting `sv` before the call also keeps the aliased case right - `compute_nid("sigvec")` from `tools/nid_names.py` gives `yhxKO9LYc8A` One thing to change: the progress report counts `sigvec` as a stub (libc 1340/1351 -> 1340/1352 in the bot comment above). `tools/progress.py` marks any `APS5_VABI` body that calls `NotImplemented_nid_no_patch` as todo, and the missing-backend guard does that. `siginterrupt` handles the same missing registration with a plain throw (`Process.cpp:309`), which counts as done. With ```cpp if (forward == nullptr) throw std::runtime_error("sigvec: libkernel has not registered sigaction"); ``` `progress.py --module libc` gives 1341 done / 11 todo with `sigvec` done, and `guest_sigvec` still passes (`NotImplemented_nid_no_patch` throws `std::runtime_error` too, so the `MissingBackend` catch is unchanged). Not checked: which PS5 module exports `sigvec` (no dump here), Windows/macOS. The #10749 ordering question in the earlier review still stands; I didn't look into that part.
MarcZX10 commented 2026-10-25 12:15:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T12:15:15Z.

Review: CHANGES_REQUESTED


I found one guest-memory output path that needs guarding before this is ready. When previous is non-null, sigvec_nid_postfix writes handler, mask, and flags directly into that caller buffer after the forwarded sigaction call. If previous points into GuestArena-backed memory, these stores bypass the GuestArena::HostWrite bookkeeping used to notify shared backing/write-watch and do not handle a rejected read-only Windows mapping. Please open a writable scope for the full GuestSignalVector output before mutating it and handle Open() failure without partially writing the result; add a guest-backed or read-only-view regression if the harness supports it. The current test uses stack GuestSignalVector objects, so it does not exercise that path. I checked the frozen-head diff with git diff --check and python3 tools/check_conventions.py --base upstream/main --head refs/pr/10953; both pass. The hosted eligibility, intake, conventions, labels and report checks pass; hosted product builds are skipped. The 5/5 Linux CTests in the PR description are author-reported, not independently rerun here, and PS5/Windows/macOS behavior remains unverified.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5643159984 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10953#pullrequestreview-5643159984). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-25T12:15:15Z. **Review:** CHANGES_REQUESTED --- I found one guest-memory output path that needs guarding before this is ready. When `previous` is non-null, `sigvec_nid_postfix` writes `handler`, `mask`, and `flags` directly into that caller buffer after the forwarded `sigaction` call. If `previous` points into GuestArena-backed memory, these stores bypass the `GuestArena::HostWrite` bookkeeping used to notify shared backing/write-watch and do not handle a rejected read-only Windows mapping. Please open a writable scope for the full `GuestSignalVector` output before mutating it and handle `Open()` failure without partially writing the result; add a guest-backed or read-only-view regression if the harness supports it. The current test uses stack `GuestSignalVector` objects, so it does not exercise that path. I checked the frozen-head diff with `git diff --check` and `python3 tools/check_conventions.py --base upstream/main --head refs/pr/10953`; both pass. The hosted eligibility, intake, conventions, labels and report checks pass; hosted product builds are skipped. The 5/5 Linux CTests in the PR description are author-reported, not independently rerun here, and PS5/Windows/macOS behavior remains unverified.
MarcZX10 commented 2026-10-25 13:27:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T13:27:02Z.

Review: APPROVED


Reviewed exact updated head 9a8104e0296bf7d7f882b99f5749744557298fe7. The previous-vector buffer is guarded across its full range before calling the forwarded sigaction, so a rejected guest write returns -1/EFAULT without changing the disposition or partially updating the vector. Guest-backed tests cover cross-page output, input/output aliasing, canaries, and Windows read-only rejection. The missing backend now throws an ordinary runtime error, so progress no longer classifies this implementation as a stub.

The registration setup was moved to a separate kernel translation unit; the author reports git merge-tree is clean with #10749 and a combined libc/kernel/Internal build with 5/5 focused tests, including the relocated siginterrupt registration. I independently ran python3 tools/check_conventions.py --base upstream/main --head HEAD and git diff --check upstream/main...HEAD; both pass. Windows rejection cases are present but not reported as executed, and broad hosted product jobs are skipped. The previously raised guest-output and integration-conflict issues are addressed.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5643383894 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10953#pullrequestreview-5643383894). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-25T13:27:02Z. **Review:** APPROVED --- Reviewed exact updated head `9a8104e0296bf7d7f882b99f5749744557298fe7`. The previous-vector buffer is guarded across its full range before calling the forwarded `sigaction`, so a rejected guest write returns `-1/EFAULT` without changing the disposition or partially updating the vector. Guest-backed tests cover cross-page output, input/output aliasing, canaries, and Windows read-only rejection. The missing backend now throws an ordinary runtime error, so progress no longer classifies this implementation as a stub. The registration setup was moved to a separate kernel translation unit; the author reports `git merge-tree` is clean with #10749 and a combined libc/kernel/Internal build with 5/5 focused tests, including the relocated `siginterrupt` registration. I independently ran `python3 tools/check_conventions.py --base upstream/main --head HEAD` and `git diff --check upstream/main...HEAD`; both pass. Windows rejection cases are present but not reported as executed, and broad hosted product jobs are skipped. The previously raised guest-output and integration-conflict issues are addressed.
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!10953
No description provided.