fix(libSceNpUniversalDataSystem): reject mismatched param struct size in sceNpUniversalDataSystemInitialize #12803

Merged
Elma7e merged 1 commit from upstream-pr/12803 into main 2026-11-05 03:59:31 +00:00
Elma7e commented 2026-10-29 09:58:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Elma7e on 2026-10-29T09:58:16Z.


What

Reject mismatched parameter structure sizes (param->size != sizeof(NpUniversalDataSystemInitParam), 16 bytes) in sceNpUniversalDataSystemInitialize, throwing std::invalid_argument via APS5_INVALID_ARG_EX. This matches native module verification evidenced from PS5 firmware 13.42 module disassembly and execution data in a host harness, where the module verifies strictly size == 16 and returns 0x80553112 for any other size (smaller or larger). Cover undersized (sizeof - 1) and oversized (sizeof + 8) parameter structure rejection in GuestNpUniversalDataSystemQueries.cpp and document the host gap, firmware execution data in a host harness, and local title call-site constants in technical debt documentation.

Tested

  • Host OS: Ubuntu 26.04.1 LTS (Linux x86_64)
  • Compiler: GCC 15.2.0 (-std=c++20 -O2)
  • Execution & Runtime: Standalone test binary compiled and executed with exit code 0 (elapsed < 0.05s)
  • Conventions Check: Ran python3 tools/check_conventions.py --base upstream/main (0 errors)

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:5065940786 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12803). Originally posted by [Elma7e](https://github.com/Elma7e) on 2026-10-29T09:58:16Z. --- ### What Reject mismatched parameter structure sizes (`param->size != sizeof(NpUniversalDataSystemInitParam)`, 16 bytes) in `sceNpUniversalDataSystemInitialize`, throwing `std::invalid_argument` via `APS5_INVALID_ARG_EX`. This matches native module verification evidenced from PS5 firmware 13.42 module disassembly and execution data in a host harness, where the module verifies strictly `size == 16` and returns `0x80553112` for any other size (smaller or larger). Cover undersized (`sizeof - 1`) and oversized (`sizeof + 8`) parameter structure rejection in `GuestNpUniversalDataSystemQueries.cpp` and document the host gap, firmware execution data in a host harness, and local title call-site constants in technical debt documentation. ### Tested - **Host OS:** Ubuntu 26.04.1 LTS (Linux x86_64) - **Compiler:** GCC 15.2.0 (-std=c++20 -O2) - **Execution & Runtime:** Standalone test binary compiled and executed with exit code 0 (elapsed < 0.05s) - **Conventions Check:** Ran python3 tools/check_conventions.py --base upstream/main (0 errors) ### Checklist - [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: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
XairRrR commented 2026-10-29 10:02:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-10-29T10:02:58Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The change merges cleanly, builds, its test passes and fails without the fix as it should. But nothing supports the strict size equality check, and the new technical-debt entry describes what the code does instead of stating the gap.

What I ran

  • Head: 4f1686aaca6891cb0883f245333493f6a5145f35
  • main: f7e84c4cf1609cc10bac95a44cd431805e5ebc8a
  • Tree: the head merged into main with --no-ff, in a clean worktree, on Arch Linux 7.2.11-zen, GCC 16.2.1, Intel Core i9-14900KF.
git fetch -q origin main pull/12803/head:refs/review/12803
git checkout -q --detach origin/main
git merge -q --no-ff --no-edit refs/review/12803
git diff --check origin/main...refs/review/12803
python3 tools/check_conventions.py --base origin/main
cmake -S . -B build
nice -n 10 cmake --build build -j10 --target guest_np_uds_queries_tests libSceNpUniversalDataSystem
nice -n 10 ctest --test-dir build -j4 -R "guest_np_uds_queries|np_uds_events|guest_np_trophy" --output-on-failure
# negative control
git checkout origin/main -- core/libs/prx/libSceNpUniversalDataSystem/src/System.cpp
nice -n 10 cmake --build build -j10 --target guest_np_uds_queries_tests libSceNpUniversalDataSystem
nice -n 10 ctest --test-dir build -R "^guest_np_uds_queries$" --output-on-failure
git checkout HEAD -- core/libs/prx/libSceNpUniversalDataSystem/src/System.cpp

Results

Check Result
Merge into main Clean
git diff --check No output
tools/check_conventions.py --base origin/main All conventions checks passed.
Build (libSceNpUniversalDataSystem, guest_np_uds_queries_tests) OK
guest_np_uds_queries, np_uds_events, guest_np_trophy* (6 tests) 6/6 passed, 0.04 s total
Negative control guest_np_uds_queries fails, as expected
ctest, merged tree
4/6 Test #2189: np_uds_events ....................   Passed    0.00 sec
5/6 Test #2193: guest_np_uds_queries .............   Passed    0.00 sec
6/6 Test #2192: guest_np_trophy_stats ............   Passed    0.00 sec

100% tests passed out of 6

Negative control

I restored only core/libs/prx/libSceNpUniversalDataSystem/src/System.cpp from main and rebuilt. guest_np_uds_queries then aborts at the first new size check:

ctest, production file reverted
1/1 Test #2193: guest_np_uds_queries .............Subprocess aborted***Exception:   0.08 sec
UDS query check failed at line 40

0% tests passed, 1 tests failed out of 1

After the run I restored the merged file and rebuilt, and the test passed again.

Findings

Blocking

  1. Nothing supports the strict equality check, and the debt entry doesn't state the gap. System.cpp:12 now throws for every param->size other than 16. The test also requires that a larger size (sizeof + 8) be rejected (GuestNpUniversalDataSystemQueries.cpp:41-42). The PR gives no source for this check: no console measurement and no reference implementation. The debt file already cites KytyPS5 for this library, and its NpUniversalDataSystemInitialize rejects only nullptr. It logs size and accepts any value. So before this PR, a title that passes a different size (for example a different SDK revision of the struct, or a zero-filled struct) initialised normally; after it, the title aborts in APS5_INVALID_ARG_EX. Throwing when the native behaviour is unknown is consistent with the project rules, but then the uncertainty has to be written down. The new entry, docs/dev/debt/libSceNpUniversalDataSystem.md:26, sits under ### Unknown function info but only says the function "enforces struct size matching sizeof(NpUniversalDataSystemInitParam) before returning OK". CONTRIBUTING.md requires that "An entry states the gap first (what differs from the console, what is unverified, what throws)".
    Suggested fix: either cite a source showing that the console rejects size != sizeof(...), including larger values, or reword the entry to state the gap. For example: whether the console checks size, whether it accepts larger values, and which error it returns are not verified on a console (KytyPS5 accepts any size); the host throws std::invalid_argument for any size other than 16. If there is no source for rejecting larger sizes, consider keeping only the checks you can justify, and dropping the sizeof + 8 assertion, which asserts unverified behaviour.

Non-blocking

  1. The PR title uses fix(...) and the description doesn't say what was broken. Without a title or trace showing a wrong size causing a problem, this tightens validation rather than fixing a bug. Saying so in What would help reviewers judge the compatibility risk above.

Not verified

  • Console behaviour of sceNpUniversalDataSystemInitialize for a mismatched size: I have no hardware or SDK reference.
  • What size value real titles pass. I didn't run any title, so I can't confirm that none of them passes a value other than 16.
  • Windows and macOS builds. I built only on Linux with GCC.

To get this to a good state

  • Give a source for the equality check, or rewrite the debt entry at docs/dev/debt/libSceNpUniversalDataSystem.md:26 so it states what is unverified and what throws, as CONTRIBUTING.md requires.
  • If there is no source for it, drop or justify the test case that expects sizeof + 8 to be rejected.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5695933115 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12803#pullrequestreview-5695933115). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-10-29T10:02:58Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The change merges cleanly, builds, its test passes and fails without the fix as it should. But nothing supports the strict `size` equality check, and the new technical-debt entry describes what the code does instead of stating the gap. ## What I ran - Head: `4f1686aaca6891cb0883f245333493f6a5145f35` - `main`: `f7e84c4cf1609cc10bac95a44cd431805e5ebc8a` - Tree: the head merged into `main` with `--no-ff`, in a clean worktree, on Arch Linux 7.2.11-zen, GCC 16.2.1, Intel Core i9-14900KF. ```sh git fetch -q origin main pull/12803/head:refs/review/12803 git checkout -q --detach origin/main git merge -q --no-ff --no-edit refs/review/12803 git diff --check origin/main...refs/review/12803 python3 tools/check_conventions.py --base origin/main cmake -S . -B build nice -n 10 cmake --build build -j10 --target guest_np_uds_queries_tests libSceNpUniversalDataSystem nice -n 10 ctest --test-dir build -j4 -R "guest_np_uds_queries|np_uds_events|guest_np_trophy" --output-on-failure # negative control git checkout origin/main -- core/libs/prx/libSceNpUniversalDataSystem/src/System.cpp nice -n 10 cmake --build build -j10 --target guest_np_uds_queries_tests libSceNpUniversalDataSystem nice -n 10 ctest --test-dir build -R "^guest_np_uds_queries$" --output-on-failure git checkout HEAD -- core/libs/prx/libSceNpUniversalDataSystem/src/System.cpp ``` ## Results | Check | Result | | --- | --- | | Merge into `main` | Clean | | `git diff --check` | No output | | `tools/check_conventions.py --base origin/main` | `All conventions checks passed.` | | Build (`libSceNpUniversalDataSystem`, `guest_np_uds_queries_tests`) | OK | | `guest_np_uds_queries`, `np_uds_events`, `guest_np_trophy*` (6 tests) | 6/6 passed, 0.04 s total | | Negative control | `guest_np_uds_queries` fails, as expected | <details><summary>ctest, merged tree</summary> ``` 4/6 Test #2189: np_uds_events .................... Passed 0.00 sec 5/6 Test #2193: guest_np_uds_queries ............. Passed 0.00 sec 6/6 Test #2192: guest_np_trophy_stats ............ Passed 0.00 sec 100% tests passed out of 6 ``` </details> ## Negative control I restored only `core/libs/prx/libSceNpUniversalDataSystem/src/System.cpp` from `main` and rebuilt. `guest_np_uds_queries` then aborts at the first new size check: <details><summary>ctest, production file reverted</summary> ``` 1/1 Test #2193: guest_np_uds_queries .............Subprocess aborted***Exception: 0.08 sec UDS query check failed at line 40 0% tests passed, 1 tests failed out of 1 ``` </details> After the run I restored the merged file and rebuilt, and the test passed again. ## Findings ### Blocking 1. **Nothing supports the strict equality check, and the debt entry doesn't state the gap.** [`System.cpp:12`](https://github.com/boykopovar/AnyPS5/blob/4f1686aaca6891cb0883f245333493f6a5145f35/core/libs/prx/libSceNpUniversalDataSystem/src/System.cpp#L11-L16) now throws for every `param->size` other than 16. The test also requires that a larger size (`sizeof + 8`) be rejected ([`GuestNpUniversalDataSystemQueries.cpp:41-42`](https://github.com/boykopovar/AnyPS5/blob/4f1686aaca6891cb0883f245333493f6a5145f35/core/libs/tests/GuestNpUniversalDataSystemQueries.cpp#L36-L43)). The PR gives no source for this check: no console measurement and no reference implementation. The debt file already cites KytyPS5 for this library, and its [`NpUniversalDataSystemInitialize`](https://github.com/KytyPS5/KytyPS5/blob/9e41d8320a2774b303fbad344c2347e8d0292e83/src/libs/libTrophy.cpp#L601-L614) rejects only `nullptr`. It logs `size` and accepts any value. So before this PR, a title that passes a different `size` (for example a different SDK revision of the struct, or a zero-filled struct) initialised normally; after it, the title aborts in `APS5_INVALID_ARG_EX`. Throwing when the native behaviour is unknown is consistent with the project rules, but then the uncertainty has to be written down. The new entry, [`docs/dev/debt/libSceNpUniversalDataSystem.md:26`](https://github.com/boykopovar/AnyPS5/blob/4f1686aaca6891cb0883f245333493f6a5145f35/docs/dev/debt/libSceNpUniversalDataSystem.md#L26), sits under `### Unknown function info` but only says the function "enforces struct size matching `sizeof(NpUniversalDataSystemInitParam)` before returning OK". [CONTRIBUTING.md](https://github.com/boykopovar/AnyPS5/blob/f7e84c4cf1609cc10bac95a44cd431805e5ebc8a/CONTRIBUTING.md#L78) requires that "An entry states the gap first (what differs from the console, what is unverified, what throws)". *Suggested fix:* either cite a source showing that the console rejects `size != sizeof(...)`, including larger values, or reword the entry to state the gap. For example: whether the console checks `size`, whether it accepts larger values, and which error it returns are not verified on a console (KytyPS5 accepts any `size`); the host throws `std::invalid_argument` for any `size` other than 16. If there is no source for rejecting larger sizes, consider keeping only the checks you can justify, and dropping the `sizeof + 8` assertion, which asserts unverified behaviour. ### Non-blocking 1. The PR title uses `fix(...)` and the description doesn't say what was broken. Without a title or trace showing a wrong `size` causing a problem, this tightens validation rather than fixing a bug. Saying so in `What` would help reviewers judge the compatibility risk above. ## Not verified - Console behaviour of `sceNpUniversalDataSystemInitialize` for a mismatched `size`: I have no hardware or SDK reference. - What `size` value real titles pass. I didn't run any title, so I can't confirm that none of them passes a value other than 16. - Windows and macOS builds. I built only on Linux with GCC. ## To get this to a good state - Give a source for the equality check, or rewrite the debt entry at `docs/dev/debt/libSceNpUniversalDataSystem.md:26` so it states what is unverified and what throws, as CONTRIBUTING.md requires. - If there is no source for it, drop or justify the test case that expects `sizeof + 8` to be rejected.
XairRrR commented 2026-10-29 10:45:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-10-29T10:45:54Z.

Review: APPROVED


Re-checked — approved

The new commit relaxes the check to reject only size < 16, drops the size + 8 test case and rewrites the debt entry to state the gap. It merges cleanly, builds, the tests pass and the negative control fails as it should.

What changed since my last review

  • System.cpp:12 now throws only for param->size < sizeof(NpUniversalDataSystemInitParam). Larger sizes are accepted.
  • GuestNpUniversalDataSystemQueries.cpp:38-40 keeps only the sizeof - 1 rejection. The sizeof + 8 case is gone.
  • docs/dev/debt/libSceNpUniversalDataSystem.md:26 now opens with what is unverified (whether the console checks size, whether it accepts larger values, which error it returns), cites KytyPS5 accepting any size, and says what throws.
  • The branch was rebased onto current main. The author's reply addresses both my review and the comment from oneandonlydean. The PR title and description did not change.

What I ran

  • Head: c5a41714281d4ba5c3166b427a9c3860e8440e5b
  • main: 1db077e876a839f75d11a56e728e7f56a4a8c25e
  • Tree: the head merged into main with --no-ff, in a clean worktree, on Arch Linux 7.2.11-zen, GCC 16.2.1, Intel Core i9-14900KF.
git fetch -q origin main pull/12803/head:refs/review/12803
git checkout -q --detach origin/main
git merge -q --no-ff --no-edit refs/review/12803
git diff --check origin/main...refs/review/12803
python3 tools/check_conventions.py --base origin/main
cmake -S . -B build
nice -n 10 cmake --build build -j10 --target guest_np_uds_queries_tests libSceNpUniversalDataSystem
nice -n 10 ctest --test-dir build -j4 -R "guest_np_uds_queries|np_uds_events|guest_np_trophy" --output-on-failure
# negative control
git checkout origin/main -- core/libs/prx/libSceNpUniversalDataSystem/src/System.cpp
nice -n 10 cmake --build build -j10 --target guest_np_uds_queries_tests libSceNpUniversalDataSystem
nice -n 10 ctest --test-dir build -R "^guest_np_uds_queries$" --output-on-failure
git checkout HEAD -- core/libs/prx/libSceNpUniversalDataSystem/src/System.cpp
nice -n 10 cmake --build build -j10 --target guest_np_uds_queries_tests libSceNpUniversalDataSystem
nice -n 10 ctest --test-dir build -R "^guest_np_uds_queries$"
Check Result
Merge into main Clean
git diff --check No output
tools/check_conventions.py --base origin/main All conventions checks passed.
Build (libSceNpUniversalDataSystem, guest_np_uds_queries_tests) OK
guest_np_uds_queries, np_uds_events, guest_np_trophy* (6 tests) 6/6 passed, 0.05 s total
Negative control (System.cpp from main) guest_np_uds_queries aborts, as expected
After restoring the merged file guest_np_uds_queries passes
ctest, merged tree
4/6 Test #2193: guest_np_trophy_stats ............   Passed    0.00 sec
5/6 Test #2194: guest_np_uds_queries .............   Passed    0.00 sec
6/6 Test #2192: guest_np_trophy_data .............   Passed    0.00 sec

100% tests passed out of 6
ctest, production file reverted
The following tests FAILED:
	2194 - guest_np_uds_queries (Subprocess aborted)
Errors while running CTest

The only production change is the size condition, so the abort comes from the new sizeof - 1 check.

Previous findings

  • Blocking 1 (no source for the strict equality check, debt entry didn't state the gap): Resolved. Larger sizes are now accepted, which matches KytyPS5 for that range. The test no longer pins sizeof + 8 to a throw. The debt entry states what is unverified and what throws, as CONTRIBUTING.md requires. Undersized structs still throw without a console source. That follows the rule to throw when the native behaviour is unknown, and the debt entry records it.
  • Non-blocking 1 (fix(...) title, What doesn't say what was broken): Still open. The What section is also out of date now: it still says the size is validated "against sizeof(NpUniversalDataSystemInitParam), throwing ... on mismatch", but the code rejects only smaller sizes.

New findings

Blocking

None.

Non-blocking

  1. Please update the PR description and title to match the code. Describe the change as rejecting size < 16 (for example "reject undersized init param"), and say that this tightens validation rather than fixing an observed failure. The commit subject already says this. Whoever squash-merges will probably take the PR title.

Not verified

  • How the console handles a size below 16, and which error it returns. I have no hardware or SDK reference.
  • What size the local titles pass. I didn't inspect or run any title, so I can't confirm that none of them passes a zeroed or smaller struct, which would now abort.
  • Windows and macOS builds. I built only on Linux with GCC.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5696445493 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12803#pullrequestreview-5696445493). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-10-29T10:45:54Z. **Review:** APPROVED --- # Re-checked — approved The new commit relaxes the check to reject only `size < 16`, drops the `size + 8` test case and rewrites the debt entry to state the gap. It merges cleanly, builds, the tests pass and the negative control fails as it should. ## What changed since my last review - [`System.cpp:12`](https://github.com/boykopovar/AnyPS5/blob/c5a41714281d4ba5c3166b427a9c3860e8440e5b/core/libs/prx/libSceNpUniversalDataSystem/src/System.cpp#L11-L16) now throws only for `param->size < sizeof(NpUniversalDataSystemInitParam)`. Larger sizes are accepted. - [`GuestNpUniversalDataSystemQueries.cpp:38-40`](https://github.com/boykopovar/AnyPS5/blob/c5a41714281d4ba5c3166b427a9c3860e8440e5b/core/libs/tests/GuestNpUniversalDataSystemQueries.cpp#L36-L41) keeps only the `sizeof - 1` rejection. The `sizeof + 8` case is gone. - [`docs/dev/debt/libSceNpUniversalDataSystem.md:26`](https://github.com/boykopovar/AnyPS5/blob/c5a41714281d4ba5c3166b427a9c3860e8440e5b/docs/dev/debt/libSceNpUniversalDataSystem.md#L26) now opens with what is unverified (whether the console checks `size`, whether it accepts larger values, which error it returns), cites KytyPS5 accepting any `size`, and says what throws. - The branch was rebased onto current `main`. The author's reply addresses both my review and the comment from oneandonlydean. The PR title and description did not change. ## What I ran - Head: `c5a41714281d4ba5c3166b427a9c3860e8440e5b` - `main`: `1db077e876a839f75d11a56e728e7f56a4a8c25e` - Tree: the head merged into `main` with `--no-ff`, in a clean worktree, on Arch Linux 7.2.11-zen, GCC 16.2.1, Intel Core i9-14900KF. ```sh git fetch -q origin main pull/12803/head:refs/review/12803 git checkout -q --detach origin/main git merge -q --no-ff --no-edit refs/review/12803 git diff --check origin/main...refs/review/12803 python3 tools/check_conventions.py --base origin/main cmake -S . -B build nice -n 10 cmake --build build -j10 --target guest_np_uds_queries_tests libSceNpUniversalDataSystem nice -n 10 ctest --test-dir build -j4 -R "guest_np_uds_queries|np_uds_events|guest_np_trophy" --output-on-failure # negative control git checkout origin/main -- core/libs/prx/libSceNpUniversalDataSystem/src/System.cpp nice -n 10 cmake --build build -j10 --target guest_np_uds_queries_tests libSceNpUniversalDataSystem nice -n 10 ctest --test-dir build -R "^guest_np_uds_queries$" --output-on-failure git checkout HEAD -- core/libs/prx/libSceNpUniversalDataSystem/src/System.cpp nice -n 10 cmake --build build -j10 --target guest_np_uds_queries_tests libSceNpUniversalDataSystem nice -n 10 ctest --test-dir build -R "^guest_np_uds_queries$" ``` | Check | Result | | --- | --- | | Merge into `main` | Clean | | `git diff --check` | No output | | `tools/check_conventions.py --base origin/main` | `All conventions checks passed.` | | Build (`libSceNpUniversalDataSystem`, `guest_np_uds_queries_tests`) | OK | | `guest_np_uds_queries`, `np_uds_events`, `guest_np_trophy*` (6 tests) | 6/6 passed, 0.05 s total | | Negative control (`System.cpp` from `main`) | `guest_np_uds_queries` aborts, as expected | | After restoring the merged file | `guest_np_uds_queries` passes | <details><summary>ctest, merged tree</summary> ``` 4/6 Test #2193: guest_np_trophy_stats ............ Passed 0.00 sec 5/6 Test #2194: guest_np_uds_queries ............. Passed 0.00 sec 6/6 Test #2192: guest_np_trophy_data ............. Passed 0.00 sec 100% tests passed out of 6 ``` </details> <details><summary>ctest, production file reverted</summary> ``` The following tests FAILED: 2194 - guest_np_uds_queries (Subprocess aborted) Errors while running CTest ``` </details> The only production change is the size condition, so the abort comes from the new `sizeof - 1` check. ## Previous findings - Blocking 1 (no source for the strict equality check, debt entry didn't state the gap): **Resolved.** Larger sizes are now accepted, which matches KytyPS5 for that range. The test no longer pins `sizeof + 8` to a throw. The debt entry states what is unverified and what throws, as [CONTRIBUTING.md](https://github.com/boykopovar/AnyPS5/blob/1db077e876a839f75d11a56e728e7f56a4a8c25e/CONTRIBUTING.md#L78) requires. Undersized structs still throw without a console source. That follows the rule to throw when the native behaviour is unknown, and the debt entry records it. - Non-blocking 1 (`fix(...)` title, `What` doesn't say what was broken): **Still open.** The `What` section is also out of date now: it still says the size is validated "against `sizeof(NpUniversalDataSystemInitParam)`, throwing ... on mismatch", but the code rejects only smaller sizes. ## New findings ### Blocking None. ### Non-blocking 1. Please update the PR description and title to match the code. Describe the change as rejecting `size < 16` (for example "reject undersized init param"), and say that this tightens validation rather than fixing an observed failure. The commit subject already says this. Whoever squash-merges will probably take the PR title. ## Not verified - How the console handles a `size` below 16, and which error it returns. I have no hardware or SDK reference. - What `size` the local titles pass. I didn't inspect or run any title, so I can't confirm that none of them passes a zeroed or smaller struct, which would now abort. - Windows and macOS builds. I built only on Linux with GCC.
XairRrR commented 2026-11-02 22:49:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-02T22:49:23Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

This pull request does not merge cleanly into main (5cb015caaa): head f6ce803a8486cbb1ba01e5d9fc43f5656808916b conflicts in

  • docs/dev/debt/libSceNpUniversalDataSystem.md

Please rebase it onto current main. I will review the change once it merges cleanly.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5744537949 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12803#pullrequestreview-5744537949). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-02T22:49:23Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested This pull request does not merge cleanly into `main` (5cb015caaaaf83f8ee431414ee6a457b5b307d49): head f6ce803a8486cbb1ba01e5d9fc43f5656808916b conflicts in - `docs/dev/debt/libSceNpUniversalDataSystem.md` Please rebase it onto current `main`. I will review the change once it merges cleanly. <!-- anyps5-bots job=2684 head=f6ce803a8486cbb1ba01e5d9fc43f5656808916b -->
XairRrR commented 2026-11-02 23:14:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-02T23:14:36Z.

Review: CHANGES_REQUESTED


Re-checked — changes still requested

The code and test have not changed since c5a4171428. The new commit changes only the debt entry, which now records BunnyFl's 13.42 firmware run and the local-title call sites. That run shows the module rejects every size other than 16, but the code still returns success for larger sizes.

What changed since my last review

  • The branch was rebased onto main 5cb015caaa. System.cpp and GuestNpUniversalDataSystemQueries.cpp are byte-identical to c5a4171428 (see the range-diff).
  • docs/dev/debt/libSceNpUniversalDataSystem.md:26 now says the following:
    • The 13.42 module accepts only size == 16 and returns 0x80553112 for any other size.
    • It returns 0x80553102 for a null param or pool_size == 0, and 0x80553118 when already initialized.
    • The host throws for size < 16 and accepts larger sizes.
    • The inspected titles pass 16.
  • The PR title and description now describe the change as rejecting undersized structs and say it tightens validation.

What I ran

  • Head 32128f3d1d07f9302231d1dc676b1dc74b6c6eaa, main 5cb015caaaaf83f8ee431414ee6a457b5b307d49, merged tree c1ce23c839e9369acaca4d94c9f0b661ec84f25a (--no-ff, clean worktree). Debian 13 VM, GCC 14.2.0, Release, Ninja.
git diff --check 5cb015caaaaf83f8ee431414ee6a457b5b307d49...32128f3d1d07f9302231d1dc676b1dc74b6c6eaa
python3 tools/check_conventions.py --base 5cb015caaaaf83f8ee431414ee6a457b5b307d49
ctest --test-dir build -R "^guest_np_uds_queries$" --output-on-failure
# negative control
git show 5cb015caaaaf83f8ee431414ee6a457b5b307d49:core/libs/prx/libSceNpUniversalDataSystem/src/System.cpp > core/libs/prx/libSceNpUniversalDataSystem/src/System.cpp
ninja -C build -j32 -l32 guest_np_uds_queries_tests libSceNpUniversalDataSystem
ctest --test-dir build -R "^guest_np_uds_queries$" --output-on-failure
ctest --test-dir build -R "^(agc_driver_image_sample_lod_clamp_shader_lane|unwrap_self_UnwrapTest_test_new_output_inherits_the_destination_directory_group)$"
git show c1ce23c839e9369acaca4d94c9f0b661ec84f25a:core/libs/prx/libSceNpUniversalDataSystem/src/System.cpp > core/libs/prx/libSceNpUniversalDataSystem/src/System.cpp
ninja -C build -j32 -l32 guest_np_uds_queries_tests libSceNpUniversalDataSystem
ctest --test-dir build -R "^guest_np_uds_queries$"
git status --porcelain
Check Result
git diff --check No output
check_conventions.py All conventions checks passed.
Build, libs (script) OK
guest_np_uds_queries, merged tree Passed (0.01 s)
Negative control (System.cpp from main) guest_np_uds_queries aborts (Subprocess aborted), as expected
After restoring, git status --porcelain Passes; worktree clean
Script's 2 "new failures" Not caused by this PR: both still fail with System.cpp restored from main (see below)
Unrelated failures with the production file from main
2/2 Test #1772: agc_driver_image_sample_lod_clamp_shader_lane ....***Failed    3.33 sec
0% tests passed, 2 tests failed out of 2
  • agc_driver_image_sample_lod_clamp_shader_lane is an AGC sampling test that this change cannot reach.
  • unwrap_self_..._destination_directory_group fails in os.chown with EINVAL inside the sandbox.
  • The baseline is from an older main (096c45570f). Both failures come from main or this machine.

Previous findings

  • Blocking 1 from my first review (no source for the strict size rule, gap not stated): No longer applies, as I resolved it then. New evidence changes the picture, so I am reopening the question as new blocking finding 1 below. I accepted "reject only < 16" because nothing showed that larger sizes are invalid. Now there is evidence.
  • Non-blocking 1 (title and What did not match the code): Resolved. The title says "reject undersized param struct". The description says the change tightens validation rather than fixing an observed failure.

New findings

Blocking

  1. The code accepts size > 16, which the PR's own debt entry says the module rejects. At System.cpp:12, only size < 16 throws. BunnyFl's 13.42 run (comment of 2026-10-30) returned 0x80553112 for 0x11, 0x18, 0x20, 0x100 and ~0. The PR now writes this into the debt entry.
    • oneandonlydean asked to accept larger sizes "unless there is evidence that a larger size is invalid", and I agreed then. That evidence now exists. The run used a host harness rather than a console, but it executed the module's own code (a 64-bit compare of the first field).
    • So for size > 16 the function now neither does what the module does nor throws. CONTRIBUTING.md requires one or the other.
    • The description's reason for accepting larger sizes ("from future SDK revisions") is contradicted by the same data. The inspected titles all pass 16.
    • Suggested fix: reject param->size != sizeof(NpUniversalDataSystemInitParam) with the same APS5_INVALID_ARG_EX, and pin size + 8 (or 0x18) to a rejection in the test, citing the 13.42 run in the debt entry. Alternatively, return 0x80553112 for any size != 16, as the module does, and test that. Either way, update the debt entry and the description to match.

Non-blocking

  1. libSceNpUniversalDataSystem.md:26 says "tested natively", which a reader can take to mean on a console. BunnyFl's run used a host harness on Windows, not a console, and partly skipped the module's start routine.
    • Please say that directly, for example "run in a host harness, not on a console".
    • Please also open with the gap, as CONTRIBUTING.md asks. The host throws where the module returns 0x80553112/0x80553102, accepts pool_size == 0, and keeps no initialized state. The firmware data can follow as the evidence.

Not verified

  • Console behaviour. I have no hardware, and I did not rerun BunnyFl's firmware harness.
  • The title call-site constants. These are author-reported; I did not inspect any title.
  • np_uds_events. Its executable is not part of this selected build ("Not Run"), and the PR does not touch it.
  • Windows and macOS builds.

To get this to a good state

  • Make the size check match the documented module behaviour (!= 16, either thrown or returned as 0x80553112).
  • Pin a larger size in the test. Rerun the negative control.
  • Adjust the debt entry wording and the PR description to match.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5744777220 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12803#pullrequestreview-5744777220). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-02T23:14:36Z. **Review:** CHANGES_REQUESTED --- # Re-checked — changes still requested The code and test have not changed since c5a4171428. The new commit changes only the debt entry, which now records BunnyFl's 13.42 firmware run and the local-title call sites. That run shows the module rejects every `size` other than 16, but the code still returns success for larger sizes. ## What changed since my last review - The branch was rebased onto `main` 5cb015caaa. `System.cpp` and `GuestNpUniversalDataSystemQueries.cpp` are byte-identical to c5a4171428 (see the range-diff). - [`docs/dev/debt/libSceNpUniversalDataSystem.md:26`](https://github.com/boykopovar/AnyPS5/blob/32128f3d1d07f9302231d1dc676b1dc74b6c6eaa/docs/dev/debt/libSceNpUniversalDataSystem.md#L26) now says the following: - The 13.42 module accepts only `size == 16` and returns `0x80553112` for any other size. - It returns `0x80553102` for a null `param` or `pool_size == 0`, and `0x80553118` when already initialized. - The host throws for `size < 16` and accepts larger sizes. - The inspected titles pass 16. - The PR title and description now describe the change as rejecting undersized structs and say it tightens validation. ## What I ran - Head `32128f3d1d07f9302231d1dc676b1dc74b6c6eaa`, `main` `5cb015caaaaf83f8ee431414ee6a457b5b307d49`, merged tree `c1ce23c839e9369acaca4d94c9f0b661ec84f25a` (`--no-ff`, clean worktree). Debian 13 VM, GCC 14.2.0, Release, Ninja. ```sh git diff --check 5cb015caaaaf83f8ee431414ee6a457b5b307d49...32128f3d1d07f9302231d1dc676b1dc74b6c6eaa python3 tools/check_conventions.py --base 5cb015caaaaf83f8ee431414ee6a457b5b307d49 ctest --test-dir build -R "^guest_np_uds_queries$" --output-on-failure # negative control git show 5cb015caaaaf83f8ee431414ee6a457b5b307d49:core/libs/prx/libSceNpUniversalDataSystem/src/System.cpp > core/libs/prx/libSceNpUniversalDataSystem/src/System.cpp ninja -C build -j32 -l32 guest_np_uds_queries_tests libSceNpUniversalDataSystem ctest --test-dir build -R "^guest_np_uds_queries$" --output-on-failure ctest --test-dir build -R "^(agc_driver_image_sample_lod_clamp_shader_lane|unwrap_self_UnwrapTest_test_new_output_inherits_the_destination_directory_group)$" git show c1ce23c839e9369acaca4d94c9f0b661ec84f25a:core/libs/prx/libSceNpUniversalDataSystem/src/System.cpp > core/libs/prx/libSceNpUniversalDataSystem/src/System.cpp ninja -C build -j32 -l32 guest_np_uds_queries_tests libSceNpUniversalDataSystem ctest --test-dir build -R "^guest_np_uds_queries$" git status --porcelain ``` | Check | Result | | --- | --- | | `git diff --check` | No output | | `check_conventions.py` | `All conventions checks passed.` | | Build, `libs` (script) | OK | | `guest_np_uds_queries`, merged tree | Passed (0.01 s) | | Negative control (`System.cpp` from `main`) | `guest_np_uds_queries` aborts (Subprocess aborted), as expected | | After restoring, `git status --porcelain` | Passes; worktree clean | | Script's 2 "new failures" | Not caused by this PR: both still fail with `System.cpp` restored from `main` (see below) | <details><summary>Unrelated failures with the production file from main</summary> ``` 2/2 Test #1772: agc_driver_image_sample_lod_clamp_shader_lane ....***Failed 3.33 sec 0% tests passed, 2 tests failed out of 2 ``` - `agc_driver_image_sample_lod_clamp_shader_lane` is an AGC sampling test that this change cannot reach. - `unwrap_self_..._destination_directory_group` fails in `os.chown` with `EINVAL` inside the sandbox. - The baseline is from an older `main` (096c45570f). Both failures come from `main` or this machine. </details> ## Previous findings - Blocking 1 from my first review (no source for the strict `size` rule, gap not stated): **No longer applies, as I resolved it then.** New evidence changes the picture, so I am reopening the question as new blocking finding 1 below. I accepted "reject only < 16" because nothing showed that larger sizes are invalid. Now there is evidence. - Non-blocking 1 (title and `What` did not match the code): **Resolved.** The title says "reject undersized param struct". The description says the change tightens validation rather than fixing an observed failure. ## New findings ### Blocking 1. **The code accepts `size > 16`, which the PR's own debt entry says the module rejects.** At [`System.cpp:12`](https://github.com/boykopovar/AnyPS5/blob/32128f3d1d07f9302231d1dc676b1dc74b6c6eaa/core/libs/prx/libSceNpUniversalDataSystem/src/System.cpp#L11-L16), only `size < 16` throws. BunnyFl's 13.42 run (comment of 2026-10-30) returned `0x80553112` for 0x11, 0x18, 0x20, 0x100 and `~0`. The PR now writes this into the debt entry. - oneandonlydean asked to accept larger sizes "unless there is evidence that a larger size is invalid", and I agreed then. That evidence now exists. The run used a host harness rather than a console, but it executed the module's own code (a 64-bit compare of the first field). - So for `size > 16` the function now neither does what the module does nor throws. CONTRIBUTING.md requires one or the other. - The description's reason for accepting larger sizes ("from future SDK revisions") is contradicted by the same data. The inspected titles all pass 16. - Suggested fix: reject `param->size != sizeof(NpUniversalDataSystemInitParam)` with the same `APS5_INVALID_ARG_EX`, and pin `size + 8` (or 0x18) to a rejection in the test, citing the 13.42 run in the debt entry. Alternatively, return `0x80553112` for any `size != 16`, as the module does, and test that. Either way, update the debt entry and the description to match. ### Non-blocking 1. [`libSceNpUniversalDataSystem.md:26`](https://github.com/boykopovar/AnyPS5/blob/32128f3d1d07f9302231d1dc676b1dc74b6c6eaa/docs/dev/debt/libSceNpUniversalDataSystem.md#L26) says "tested natively", which a reader can take to mean on a console. BunnyFl's run used a host harness on Windows, not a console, and partly skipped the module's start routine. - Please say that directly, for example "run in a host harness, not on a console". - Please also open with the gap, as CONTRIBUTING.md asks. The host throws where the module returns `0x80553112`/`0x80553102`, accepts `pool_size == 0`, and keeps no initialized state. The firmware data can follow as the evidence. ## Not verified - Console behaviour. I have no hardware, and I did not rerun BunnyFl's firmware harness. - The title call-site constants. These are author-reported; I did not inspect any title. - `np_uds_events`. Its executable is not part of this selected build ("Not Run"), and the PR does not touch it. - Windows and macOS builds. ## To get this to a good state - Make the `size` check match the documented module behaviour (`!= 16`, either thrown or returned as `0x80553112`). - Pin a larger size in the test. Rerun the negative control. - Adjust the debt entry wording and the PR description to match. <!-- anyps5-bots job=2700 head=32128f3d1d07f9302231d1dc676b1dc74b6c6eaa -->
XairRrR commented 2026-11-02 23:43:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-02T23:43:55Z.

Review: APPROVED


Re-checked — approved

The PR now rejects every size other than 16, as the 13.42 module run showed. The test pins both a smaller and a larger size. The debt entry opens with the host gap and says the firmware data came from a host harness, not a console.

What changed since my last review

  • System.cpp:12: the condition changed from param->size < sizeof(...) to param->size != sizeof(NpUniversalDataSystemInitParam).
  • GuestNpUniversalDataSystemQueries.cpp: added a check that sizeof + 8 (0x18) is rejected, next to the existing sizeof - 1 check.
  • libSceNpUniversalDataSystem.md:26: the entry now opens with the gap. The host throws for a null param or any size != 16, accepts pool_size == 0 and keeps no initialized state. The 13.42 run follows as evidence and is described as "run in a host harness (on Windows, not on a console)".
  • The commit message, title and description now describe the strict size rule.

What I ran

Head fcc66ecc5714cf30247e37aee3d069f36f14f526, main 5cb015caaaaf83f8ee431414ee6a457b5b307d49, merged tree 99114ca0901abb53a3fcdd5ea08fbd65f9594675 (--no-ff, a clean worktree). Debian 13 VM, GCC 14.2.0, Release, Ninja.

git diff --check 5cb015caaaaf83f8ee431414ee6a457b5b307d49...fcc66ecc5714cf30247e37aee3d069f36f14f526
python3 tools/check_conventions.py --base 5cb015caaaaf83f8ee431414ee6a457b5b307d49
ctest --test-dir build -R "^guest_np_uds_queries$" --output-on-failure
# negative control 1: System.cpp from main
git show 5cb015caaaaf83f8ee431414ee6a457b5b307d49:core/libs/prx/libSceNpUniversalDataSystem/src/System.cpp > core/libs/prx/libSceNpUniversalDataSystem/src/System.cpp
ninja -C build -j32 -l32 guest_np_uds_queries_tests libSceNpUniversalDataSystem
ctest --test-dir build -R "^guest_np_uds_queries$" --output-on-failure
# negative control 2: merged System.cpp with "!=" relaxed to "<" (the previous head's rule)
git show 99114ca0901abb53a3fcdd5ea08fbd65f9594675:core/libs/prx/libSceNpUniversalDataSystem/src/System.cpp | sed "s/param->size != sizeof/param->size < sizeof/" > core/libs/prx/libSceNpUniversalDataSystem/src/System.cpp
ninja -C build -j32 -l32 guest_np_uds_queries_tests libSceNpUniversalDataSystem
ctest --test-dir build -R "^guest_np_uds_queries$" --output-on-failure
# restore
git show 99114ca0901abb53a3fcdd5ea08fbd65f9594675:core/libs/prx/libSceNpUniversalDataSystem/src/System.cpp > core/libs/prx/libSceNpUniversalDataSystem/src/System.cpp
ninja -C build -j32 -l32 guest_np_uds_queries_tests libSceNpUniversalDataSystem
ctest --test-dir build -R "^guest_np_uds_queries$"
git status --porcelain
Check Result
git diff --check No output, exit 0
check_conventions.py All conventions checks passed.
Build, libs (script) OK
guest_np_uds_queries, merged tree Passed (0.01 s)
Negative control 1 (System.cpp from main) Fails (Subprocess aborted), as expected
Negative control 2 (< instead of !=) Fails (Subprocess aborted), so the sizeof + 8 case does reject the relaxed rule
After restoring Test passes; git status --porcelain is empty
Script's 2 "new failures" Not caused by this PR (see below)
Failures reported by the script
  • agc_driver_image_sample_lod_clamp_shader_lane and unwrap_self_UnwrapTest_test_new_output_inherits_the_destination_directory_group are the same two failures I saw on the previous head, on the same main 5cb015caaa.
  • At that point both still failed with the PR's only production file, System.cpp, restored from main.
  • The AGC sampling test cannot reach this library. The unwrap_self case fails in os.chown with EINVAL inside the sandbox.
  • The failure baseline was measured on an older main (096c45570f).

Previous findings

  • Blocking 1 (the code accepted size > 16, which the module rejects): Resolved. The check at System.cpp:12 is now != sizeof(NpUniversalDataSystemInitParam). NpUniversalDataSystemInitParam is two std::size_t fields (core/libs/SceTypes.hpp:1559-1562), so the size is 16 on every 64-bit target. The test pins 0x18 to a rejection, and negative control 2 shows that this case catches the earlier < rule.
  • Non-blocking 1 (the debt entry said "tested natively" and did not open with the gap): Resolved. The entry now opens with the host gap, says the run was "in a host harness (on Windows, not on a console)", and gives the firmware data after that.

New findings

Blocking

None.

Non-blocking

None.

Not verified

  • Console behaviour. I have no hardware and did not rerun BunnyFl's firmware harness.
  • The title call-site constants (16 in size; 0x10000 or 0x40000 in pool_size). These are reported by the author; I did not inspect any title.
  • Windows and macOS builds.
  • The author's standalone GCC 15.2 build and negative controls (author-reported). I reproduced the negative controls with ctest instead.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5745026787 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12803#pullrequestreview-5745026787). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-02T23:43:55Z. **Review:** APPROVED --- # Re-checked — approved The PR now rejects every `size` other than 16, as the 13.42 module run showed. The test pins both a smaller and a larger size. The debt entry opens with the host gap and says the firmware data came from a host harness, not a console. ## What changed since my last review - [`System.cpp:12`](https://github.com/boykopovar/AnyPS5/blob/fcc66ecc5714cf30247e37aee3d069f36f14f526/core/libs/prx/libSceNpUniversalDataSystem/src/System.cpp#L11-L16): the condition changed from `param->size < sizeof(...)` to `param->size != sizeof(NpUniversalDataSystemInitParam)`. - `GuestNpUniversalDataSystemQueries.cpp`: added a check that `sizeof + 8` (0x18) is rejected, next to the existing `sizeof - 1` check. - [`libSceNpUniversalDataSystem.md:26`](https://github.com/boykopovar/AnyPS5/blob/fcc66ecc5714cf30247e37aee3d069f36f14f526/docs/dev/debt/libSceNpUniversalDataSystem.md#L26): the entry now opens with the gap. The host throws for a null `param` or any `size != 16`, accepts `pool_size == 0` and keeps no initialized state. The 13.42 run follows as evidence and is described as "run in a host harness (on Windows, not on a console)". - The commit message, title and description now describe the strict size rule. ## What I ran Head `fcc66ecc5714cf30247e37aee3d069f36f14f526`, `main` `5cb015caaaaf83f8ee431414ee6a457b5b307d49`, merged tree `99114ca0901abb53a3fcdd5ea08fbd65f9594675` (`--no-ff`, a clean worktree). Debian 13 VM, GCC 14.2.0, Release, Ninja. ```sh git diff --check 5cb015caaaaf83f8ee431414ee6a457b5b307d49...fcc66ecc5714cf30247e37aee3d069f36f14f526 python3 tools/check_conventions.py --base 5cb015caaaaf83f8ee431414ee6a457b5b307d49 ctest --test-dir build -R "^guest_np_uds_queries$" --output-on-failure # negative control 1: System.cpp from main git show 5cb015caaaaf83f8ee431414ee6a457b5b307d49:core/libs/prx/libSceNpUniversalDataSystem/src/System.cpp > core/libs/prx/libSceNpUniversalDataSystem/src/System.cpp ninja -C build -j32 -l32 guest_np_uds_queries_tests libSceNpUniversalDataSystem ctest --test-dir build -R "^guest_np_uds_queries$" --output-on-failure # negative control 2: merged System.cpp with "!=" relaxed to "<" (the previous head's rule) git show 99114ca0901abb53a3fcdd5ea08fbd65f9594675:core/libs/prx/libSceNpUniversalDataSystem/src/System.cpp | sed "s/param->size != sizeof/param->size < sizeof/" > core/libs/prx/libSceNpUniversalDataSystem/src/System.cpp ninja -C build -j32 -l32 guest_np_uds_queries_tests libSceNpUniversalDataSystem ctest --test-dir build -R "^guest_np_uds_queries$" --output-on-failure # restore git show 99114ca0901abb53a3fcdd5ea08fbd65f9594675:core/libs/prx/libSceNpUniversalDataSystem/src/System.cpp > core/libs/prx/libSceNpUniversalDataSystem/src/System.cpp ninja -C build -j32 -l32 guest_np_uds_queries_tests libSceNpUniversalDataSystem ctest --test-dir build -R "^guest_np_uds_queries$" git status --porcelain ``` | Check | Result | | --- | --- | | `git diff --check` | No output, exit 0 | | `check_conventions.py` | `All conventions checks passed.` | | Build, `libs` (script) | OK | | `guest_np_uds_queries`, merged tree | Passed (0.01 s) | | Negative control 1 (`System.cpp` from `main`) | Fails (`Subprocess aborted`), as expected | | Negative control 2 (`<` instead of `!=`) | Fails (`Subprocess aborted`), so the `sizeof + 8` case does reject the relaxed rule | | After restoring | Test passes; `git status --porcelain` is empty | | Script's 2 "new failures" | Not caused by this PR (see below) | <details><summary>Failures reported by the script</summary> - `agc_driver_image_sample_lod_clamp_shader_lane` and `unwrap_self_UnwrapTest_test_new_output_inherits_the_destination_directory_group` are the same two failures I saw on the previous head, on the same `main` 5cb015caaa. - At that point both still failed with the PR's only production file, `System.cpp`, restored from `main`. - The AGC sampling test cannot reach this library. The `unwrap_self` case fails in `os.chown` with `EINVAL` inside the sandbox. - The failure baseline was measured on an older `main` (096c45570f). </details> ## Previous findings - Blocking 1 (the code accepted `size > 16`, which the module rejects): **Resolved.** The check at `System.cpp:12` is now `!= sizeof(NpUniversalDataSystemInitParam)`. `NpUniversalDataSystemInitParam` is two `std::size_t` fields (`core/libs/SceTypes.hpp:1559-1562`), so the size is 16 on every 64-bit target. The test pins 0x18 to a rejection, and negative control 2 shows that this case catches the earlier `<` rule. - Non-blocking 1 (the debt entry said "tested natively" and did not open with the gap): **Resolved.** The entry now opens with the host gap, says the run was "in a host harness (on Windows, not on a console)", and gives the firmware data after that. ## New findings ### Blocking None. ### Non-blocking None. ## Not verified - Console behaviour. I have no hardware and did not rerun BunnyFl's firmware harness. - The title call-site constants (16 in `size`; 0x10000 or 0x40000 in `pool_size`). These are reported by the author; I did not inspect any title. - Windows and macOS builds. - The author's standalone GCC 15.2 build and negative controls (author-reported). I reproduced the negative controls with ctest instead. <!-- anyps5-bots job=2872 head=fcc66ecc5714cf30247e37aee3d069f36f14f526 -->
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!12803
No description provided.