feat(libkernel): support MIB 1.37 (kern.arandom) in sysctl #3700

Merged
pushkarreddyy merged 1 commit from upstream-pr/3700 into main 2026-10-12 11:43:14 +00:00
pushkarreddyy commented 2026-10-11 15:37:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-11T15:37:46Z.


What

In libkernel, sysctl_nid_postfix currently hard-throws on any MIB other than {6, 3} (HW_NCPU). When running PSBox (PPSA99810) and crypto-seeded engines on Linux, the loader crashes at start-up with:

sysctl_nid_postfix: unsupported MIB 1.37

(As observed and confirmed in #3494 by @overlordxrz-source across 14 catalog title runs).

MIB {1, 37} corresponds to FreeBSD 11's {CTL_KERN, KERN_ARANDOM} (kern.arandom), which is queried by arc4random, LibreSSL/OpenSSL, and game engines to retrieve pseudo-random entropy into caller-supplied buffers.

  • sysctl_nid_postfix:
    • Added support for MIB {1, 37} (CTL_KERN, KERN_ARANDOM).
    • Read-only node: rejects writes (newValue != nullptr) with EPERM (1).
    • When oldLength == nullptr, kern___sysctl sets oldlen = 0 and the call succeeds returning 0 with no data (matching FreeBSD 11).
    • Following FreeBSD 11's sysctl_kern_arnd (sys/kern/kern_mib.c), reported size with a null buffer is min(*oldLength, 256) (0 for *oldLength == 0), rather than a fixed 256.
    • Generates random bytes up to min(*oldLength, 256) via std::random_device, matching kern.rng_pseudo, sets *oldLength to the transferred count, and returns 0.
  • sysctlbyname_nid_postfix:
    • Added lookup for "kern.arandom", delegating to MIB {1, 37}.
  • Dedicated unit tests in GuestSystemConfiguration.cpp:
    • Probe size with non-zero input length (64 -> 64, 300 -> 256).
    • Probe size with 0 input length (0 -> 0).
    • Null oldLength probe and read (nullptr length) succeeding with return 0 and unmodified errno.
    • Two distinct reads generating non-identical random buffers.
    • Smaller buffer reads (16 bytes).
    • Buffer size clamping to 256 bytes for larger buffers.
    • Named lookup via "kern.arandom".
    • Rejection of newValue (EPERM = 1).
  • Technical debt documented in docs/dev/TechnicalDebt.md.

Tested

  • Windows 11, MinGW-w64 GCC 15.2.0, Release: python tools/check_conventions.py --base origin/main passes with 0 findings.
  • git diff --check passes with zero whitespace or formatting errors.
  • Unit tests in GuestSystemConfiguration.cpp verify: probe size with non-zero input length (64 -> 64, 300 -> 256), probe size with 0 input length (0 -> 0), probe and read with oldLength == nullptr succeeding with 0, distinct non-repeating entropy streams, buffer size clamping to 256, smaller buffer reads (16 bytes), and write rejection (EPERM = 1).
  • Resolves PSBox (PPSA99810) loader crash sysctl_nid_postfix: unsupported MIB 1.37 observed in #3494.

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 in TechnicalDebt
  • 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
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4820216465 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3700). Originally posted by [pushkarreddyy](https://github.com/pushkarreddyy) on 2026-10-11T15:37:46Z. --- ### What In `libkernel`, `sysctl_nid_postfix` currently hard-throws on any MIB other than `{6, 3}` (`HW_NCPU`). When running **PSBox** (`PPSA99810`) and crypto-seeded engines on Linux, the loader crashes at start-up with: ```text sysctl_nid_postfix: unsupported MIB 1.37 ``` (As observed and confirmed in #3494 by @overlordxrz-source across 14 catalog title runs). MIB `{1, 37}` corresponds to FreeBSD 11's `{CTL_KERN, KERN_ARANDOM}` (`kern.arandom`), which is queried by `arc4random`, LibreSSL/OpenSSL, and game engines to retrieve pseudo-random entropy into caller-supplied buffers. - `sysctl_nid_postfix`: - Added support for MIB `{1, 37}` (`CTL_KERN, KERN_ARANDOM`). - Read-only node: rejects writes (`newValue != nullptr`) with `EPERM` (1). - When `oldLength == nullptr`, `kern___sysctl` sets `oldlen = 0` and the call succeeds returning 0 with no data (matching FreeBSD 11). - Following FreeBSD 11's `sysctl_kern_arnd` (`sys/kern/kern_mib.c`), reported size with a null buffer is `min(*oldLength, 256)` (0 for `*oldLength == 0`), rather than a fixed 256. - Generates random bytes up to `min(*oldLength, 256)` via `std::random_device`, matching `kern.rng_pseudo`, sets `*oldLength` to the transferred count, and returns 0. - `sysctlbyname_nid_postfix`: - Added lookup for `"kern.arandom"`, delegating to MIB `{1, 37}`. - Dedicated unit tests in `GuestSystemConfiguration.cpp`: - Probe size with non-zero input length (64 -> 64, 300 -> 256). - Probe size with 0 input length (0 -> 0). - Null `oldLength` probe and read (`nullptr` length) succeeding with return 0 and unmodified `errno`. - Two distinct reads generating non-identical random buffers. - Smaller buffer reads (16 bytes). - Buffer size clamping to 256 bytes for larger buffers. - Named lookup via `"kern.arandom"`. - Rejection of `newValue` (`EPERM` = 1). - Technical debt documented in `docs/dev/TechnicalDebt.md`. ### Tested - Windows 11, MinGW-w64 GCC 15.2.0, Release: `python tools/check_conventions.py --base origin/main` passes with 0 findings. - `git diff --check` passes with zero whitespace or formatting errors. - Unit tests in `GuestSystemConfiguration.cpp` verify: probe size with non-zero input length (64 -> 64, 300 -> 256), probe size with 0 input length (0 -> 0), probe and read with `oldLength == nullptr` succeeding with 0, distinct non-repeating entropy streams, buffer size clamping to 256, smaller buffer reads (16 bytes), and write rejection (`EPERM` = 1). - Resolves PSBox (`PPSA99810`) loader crash `sysctl_nid_postfix: unsupported MIB 1.37` observed in #3494. ### 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 in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [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] AI-assisted: yes
adriadam10 commented 2026-10-11 15:39:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T15:39:54Z.

Review: DISMISSED


Thanks. Build and guest_system_configuration pass here on the PR merged onto main. Points to fix:

  • SystemConfiguration.cpp:108-111 and test GuestSystemConfiguration.cpp:114: the probe is not a fixed 256. FreeBSD 11 sysctl_kern_arnd (sys/kern/kern_mib.c) does read_random(buf, MIN(req->oldlen, sizeof(buf))) and SYSCTL_OUTs that length, so with a null buffer the reported size is min(*oldLength, 256) (0 for *oldLength == 0). Same for a non-null buffer with a smaller length. Please follow that and change the probe test (use a non-zero input length, add a 0 and a >256 row), and fix the "matching FreeBSD" claim in the description.
  • SystemConfiguration.cpp:104-107: with oldlenp == NULL, kern___sysctl sets oldlen = 0 and the call succeeds with no data, it does not fail with EFAULT. Either follow it, or keep EFAULT and list it in the TechnicalDebt line as a deviation.
  • PR body: the template sections Tested and Checklist are missing, which is why Conventions fails. Rename "Verification" to ### Tested and add the ### Checklist section (no #### subheadings inside).
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5483881266 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3700#pullrequestreview-5483881266). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-11T15:39:54Z. **Review:** DISMISSED --- Thanks. Build and `guest_system_configuration` pass here on the PR merged onto main. Points to fix: - `SystemConfiguration.cpp:108-111` and test `GuestSystemConfiguration.cpp:114`: the probe is not a fixed 256. FreeBSD 11 `sysctl_kern_arnd` (`sys/kern/kern_mib.c`) does `read_random(buf, MIN(req->oldlen, sizeof(buf)))` and `SYSCTL_OUT`s that length, so with a null buffer the reported size is `min(*oldLength, 256)` (0 for `*oldLength == 0`). Same for a non-null buffer with a smaller length. Please follow that and change the probe test (use a non-zero input length, add a 0 and a >256 row), and fix the "matching FreeBSD" claim in the description. - `SystemConfiguration.cpp:104-107`: with `oldlenp == NULL`, `kern___sysctl` sets `oldlen = 0` and the call succeeds with no data, it does not fail with `EFAULT`. Either follow it, or keep `EFAULT` and list it in the TechnicalDebt line as a deviation. - PR body: the template sections `Tested` and `Checklist` are missing, which is why Conventions fails. Rename "Verification" to `### Tested` and add the `### Checklist` section (no `####` subheadings inside).
pushkarreddyy commented 2026-10-11 15:48:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-11T15:48:12Z.


Thanks for the thorough review and FreeBSD reference, @adriadam10!

All requested points have been addressed in a640681d9:

  1. Probe and copy-out semantics:
    • Updated SystemConfiguration.cpp so both null and non-null buffers report min(*oldLength, 256) (evaluating to 0 when *oldLength == 0), accurately reflecting FreeBSD 11 sysctl_kern_arnd (read_random(buf, MIN(req->oldlen, sizeof(buf)))).
    • Updated probe unit tests in GuestSystemConfiguration.cpp with non-zero input length (64 -> 64), >256 input length (300 -> 256), 0 input length (0 -> 0), and a small 16-byte buffer read.
  2. Null length handling (oldLength == nullptr):
    • Following FreeBSD 11 kern___sysctl, when oldlenp == NULL no data is output and the call succeeds returning 0 (instead of EFAULT). Added test verification for both oldValue == nullptr and non-null oldValue with null oldLength.
    • Updated docs/dev/TechnicalDebt.md description to match.
  3. PR description & conventions:
    • Updated description with exact ### What, ### Tested, and ### Checklist template sections.
    • Conventions CI workflow on GitHub Actions has completed with SUCCESS.
    • Preserved zero comments in C++ source files.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6110777207 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3700#issuecomment-6110777207). Originally posted by [pushkarreddyy](https://github.com/pushkarreddyy) on 2026-10-11T15:48:12Z. --- Thanks for the thorough review and FreeBSD reference, @adriadam10! All requested points have been addressed in `a640681d9`: 1. **Probe and copy-out semantics**: - Updated `SystemConfiguration.cpp` so both null and non-null buffers report `min(*oldLength, 256)` (evaluating to 0 when `*oldLength == 0`), accurately reflecting FreeBSD 11 `sysctl_kern_arnd` (`read_random(buf, MIN(req->oldlen, sizeof(buf)))`). - Updated probe unit tests in `GuestSystemConfiguration.cpp` with non-zero input length (`64 -> 64`), `>256` input length (`300 -> 256`), `0` input length (`0 -> 0`), and a small 16-byte buffer read. 2. **Null length handling (`oldLength == nullptr`)**: - Following FreeBSD 11 `kern___sysctl`, when `oldlenp == NULL` no data is output and the call succeeds returning 0 (instead of `EFAULT`). Added test verification for both `oldValue == nullptr` and non-null `oldValue` with null `oldLength`. - Updated `docs/dev/TechnicalDebt.md` description to match. 3. **PR description & conventions**: - Updated description with exact `### What`, `### Tested`, and `### Checklist` template sections. - Conventions CI workflow on GitHub Actions has completed with **SUCCESS**. - Preserved zero comments in C++ source files.
oneandonlydean commented 2026-10-11 23:16:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-11T23:16:35Z.


One thing before merging: SystemConfiguration.cpp:93 now checks newValue before the MIB, so an unsupported MIB with a new value returns EPERM where main throws unsupported MIB. Please keep the check inside the 6.3 and 1.37 branches, and rebase the TechnicalDebt line.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6115001562 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3700#issuecomment-6115001562). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-11T23:16:35Z. --- One thing before merging: `SystemConfiguration.cpp:93` now checks `newValue` before the MIB, so an unsupported MIB with a new value returns `EPERM` where main throws `unsupported MIB`. Please keep the check inside the `6.3` and `1.37` branches, and rebase the TechnicalDebt line.
screamm commented 2026-10-12 00:32:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by screamm on 2026-10-12T00:32:21Z.


Heads-up from a Windows validation attempt: this branch (a640681d, base a11c8f7f) no longer merges onto main bab7b328. SystemConfiguration.cpp conflicts with #3779 (merged as 22cecd5a: hw.physmem, kern.proc.pathname, machdep.cacheline_size, each with its own newValue check) because this PR moves the newValue/EPERM check before every MIB, and TechnicalDebt.md conflicts between neighbouring bullets. Worth a rebase: after #3798, Cloud Play (PPSA99600) also stops on this exact MIB (what(): sysctl_nid_postfix: unsupported MIB 1.37), in addition to ProsperoLichess (PPSA99009), so two catalog titles wait on it.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6115638678 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3700#issuecomment-6115638678). Originally posted by [screamm](https://github.com/screamm) on 2026-10-12T00:32:21Z. --- Heads-up from a Windows validation attempt: this branch (`a640681d`, base `a11c8f7f`) no longer merges onto `main` `bab7b328`. `SystemConfiguration.cpp` conflicts with #3779 (merged as `22cecd5a`: `hw.physmem`, `kern.proc.pathname`, `machdep.cacheline_size`, each with its own `newValue` check) because this PR moves the `newValue`/`EPERM` check before every MIB, and `TechnicalDebt.md` conflicts between neighbouring bullets. Worth a rebase: after #3798, Cloud Play (PPSA99600) also stops on this exact MIB (`what(): sysctl_nid_postfix: unsupported MIB 1.37`), in addition to ProsperoLichess (PPSA99009), so two catalog titles wait on it.
pushkarreddyy commented 2026-10-12 02:03:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-12T02:03:32Z.


Hi @adriadam10 and @screamm,

Thank you for the heads-up!

The requested rebase onto latest origin/main (d371ed307) is now complete on commit 4fa752ef4:

  • Cleanly resolved the SystemConfiguration.cpp conflict to coexist seamlessly with #3779 (hw.physmem, kern.proc.pathname, machdep.cacheline_size), keeping individual MIB
    ewValue/EPERM validation.
  • Cleanly resolved the adjacent entry in docs/dev/TechnicalDebt.md.
  • ools/check_conventions.py --base origin/main passes with 0 comments in C++ source files.
  • Unit tests in GuestSystemConfiguration.cpp pass and cover both MIB 1.37 and kern.arandom string queries.

Ready for review and merge to unblock ProsperoLichess (PPSA99009) and Cloud Play (PPSA99600). Thank you!

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6116440988 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3700#issuecomment-6116440988). Originally posted by [pushkarreddyy](https://github.com/pushkarreddyy) on 2026-10-12T02:03:32Z. --- Hi @adriadam10 and @screamm, Thank you for the heads-up! The requested rebase onto latest origin/main (d371ed307) is now complete on commit 4fa752ef4: - Cleanly resolved the SystemConfiguration.cpp conflict to coexist seamlessly with #3779 (hw.physmem, kern.proc.pathname, machdep.cacheline_size), keeping individual MIB ewValue/EPERM validation. - Cleanly resolved the adjacent entry in docs/dev/TechnicalDebt.md. - ools/check_conventions.py --base origin/main passes with 0 comments in C++ source files. - Unit tests in GuestSystemConfiguration.cpp pass and cover both MIB 1.37 and kern.arandom string queries. Ready for review and merge to unblock *ProsperoLichess* (PPSA99009) and *Cloud Play* (PPSA99600). Thank you!
github-actions[bot] commented 2026-10-12 03:02:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-12T03:02:14Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#3694 docs/dev/TechnicalDebt.md L712
#3870 docs/dev/TechnicalDebt.md L712
#3891 docs/dev/TechnicalDebt.md L712
#4156 docs/dev/TechnicalDebt.md L712
#4197 docs/dev/TechnicalDebt.md L712
#4254 docs/dev/TechnicalDebt.md L712
#4296 docs/dev/TechnicalDebt.md L712
#4374 docs/dev/TechnicalDebt.md L712
#4376 docs/dev/TechnicalDebt.md L712
#4378 docs/dev/TechnicalDebt.md L712
#4384 docs/dev/TechnicalDebt.md L712
#4386 docs/dev/TechnicalDebt.md L712
#4396 docs/dev/TechnicalDebt.md L712
#4397 docs/dev/TechnicalDebt.md L712
#4422 docs/dev/TechnicalDebt.md L712
#4423 docs/dev/TechnicalDebt.md L712
#4424 docs/dev/TechnicalDebt.md L712
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6116974228 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3700#issuecomment-6116974228). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-12T03:02:14Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | #3694 | `docs/dev/TechnicalDebt.md` [L712](https://github.com/boykopovar/AnyPS5/blob/3d8ffeb2716a83b8306b048b910ebfc613e0b040/docs/dev/TechnicalDebt.md#L712) | | | | #3870 | `docs/dev/TechnicalDebt.md` [L712](https://github.com/boykopovar/AnyPS5/blob/3d8ffeb2716a83b8306b048b910ebfc613e0b040/docs/dev/TechnicalDebt.md#L712) | | | | #3891 | `docs/dev/TechnicalDebt.md` [L712](https://github.com/boykopovar/AnyPS5/blob/3d8ffeb2716a83b8306b048b910ebfc613e0b040/docs/dev/TechnicalDebt.md#L712) | | | | #4156 | `docs/dev/TechnicalDebt.md` [L712](https://github.com/boykopovar/AnyPS5/blob/3d8ffeb2716a83b8306b048b910ebfc613e0b040/docs/dev/TechnicalDebt.md#L712) | | | | #4197 | `docs/dev/TechnicalDebt.md` [L712](https://github.com/boykopovar/AnyPS5/blob/3d8ffeb2716a83b8306b048b910ebfc613e0b040/docs/dev/TechnicalDebt.md#L712) | | | | #4254 | `docs/dev/TechnicalDebt.md` [L712](https://github.com/boykopovar/AnyPS5/blob/3d8ffeb2716a83b8306b048b910ebfc613e0b040/docs/dev/TechnicalDebt.md#L712) | | | | #4296 | `docs/dev/TechnicalDebt.md` [L712](https://github.com/boykopovar/AnyPS5/blob/3d8ffeb2716a83b8306b048b910ebfc613e0b040/docs/dev/TechnicalDebt.md#L712) | | | | #4374 | `docs/dev/TechnicalDebt.md` [L712](https://github.com/boykopovar/AnyPS5/blob/3d8ffeb2716a83b8306b048b910ebfc613e0b040/docs/dev/TechnicalDebt.md#L712) | | | | #4376 | `docs/dev/TechnicalDebt.md` [L712](https://github.com/boykopovar/AnyPS5/blob/3d8ffeb2716a83b8306b048b910ebfc613e0b040/docs/dev/TechnicalDebt.md#L712) | | | | #4378 | `docs/dev/TechnicalDebt.md` [L712](https://github.com/boykopovar/AnyPS5/blob/3d8ffeb2716a83b8306b048b910ebfc613e0b040/docs/dev/TechnicalDebt.md#L712) | | | | #4384 | `docs/dev/TechnicalDebt.md` [L712](https://github.com/boykopovar/AnyPS5/blob/3d8ffeb2716a83b8306b048b910ebfc613e0b040/docs/dev/TechnicalDebt.md#L712) | | | | #4386 | `docs/dev/TechnicalDebt.md` [L712](https://github.com/boykopovar/AnyPS5/blob/3d8ffeb2716a83b8306b048b910ebfc613e0b040/docs/dev/TechnicalDebt.md#L712) | | | | #4396 | `docs/dev/TechnicalDebt.md` [L712](https://github.com/boykopovar/AnyPS5/blob/3d8ffeb2716a83b8306b048b910ebfc613e0b040/docs/dev/TechnicalDebt.md#L712) | | | | #4397 | `docs/dev/TechnicalDebt.md` [L712](https://github.com/boykopovar/AnyPS5/blob/3d8ffeb2716a83b8306b048b910ebfc613e0b040/docs/dev/TechnicalDebt.md#L712) | | | | #4422 | `docs/dev/TechnicalDebt.md` [L712](https://github.com/boykopovar/AnyPS5/blob/3d8ffeb2716a83b8306b048b910ebfc613e0b040/docs/dev/TechnicalDebt.md#L712) | | | | #4423 | `docs/dev/TechnicalDebt.md` [L712](https://github.com/boykopovar/AnyPS5/blob/3d8ffeb2716a83b8306b048b910ebfc613e0b040/docs/dev/TechnicalDebt.md#L712) | | | | #4424 | `docs/dev/TechnicalDebt.md` [L712](https://github.com/boykopovar/AnyPS5/blob/3d8ffeb2716a83b8306b048b910ebfc613e0b040/docs/dev/TechnicalDebt.md#L712) | | |
babyhuey commented 2026-10-12 03:21:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by babyhuey on 2026-10-12T03:21:07Z.


guest_system_configuration aborts on Linux at this head (5d8bfd96), both alone and merged onto main d146ec1b. main itself passes. The linux/windows CI jobs are skipped here, so CI didn't catch it.

The failing check is Require(*__error_nid_postfix() == 13); at GuestSystemConfiguration.cpp:229, the last line of CheckArandomSysctl. errno is still 1 there, from the expected EPERM of the write case at line 221, and nothing sets it back to 13 before line 229 (found by printing the line in Require; Ubuntu 24.04, GCC 13).

Setting *__error_nid_postfix() = 13; right after the line-221 check should fix it, the same way main() resets it between checks.

I'll post PSBox (PPSA99810) results for this PR on Linux and Windows separately. On main, PSBox's next stop is now kern.arandom.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6117143547 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3700#issuecomment-6117143547). Originally posted by [babyhuey](https://github.com/babyhuey) on 2026-10-12T03:21:07Z. --- `guest_system_configuration` aborts on Linux at this head (5d8bfd96), both alone and merged onto `main` d146ec1b. `main` itself passes. The `linux`/`windows` CI jobs are skipped here, so CI didn't catch it. The failing check is `Require(*__error_nid_postfix() == 13);` at `GuestSystemConfiguration.cpp:229`, the last line of `CheckArandomSysctl`. `errno` is still 1 there, from the expected `EPERM` of the write case at line 221, and nothing sets it back to 13 before line 229 (found by printing the line in `Require`; Ubuntu 24.04, GCC 13). Setting `*__error_nid_postfix() = 13;` right after the line-221 check should fix it, the same way `main()` resets it between checks. I'll post PSBox (PPSA99810) results for this PR on Linux and Windows separately. On `main`, PSBox's next stop is now `kern.arandom`.
babyhuey commented 2026-10-12 05:27:28 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by babyhuey on 2026-10-12T05:27:28Z.


PSBox (PPSA99810) results for this PR, with #3494 now on main:

  • main d146ec1b, Windows 11 (MinGW GCC 15.2): it creates its swapchain, then throws sysctl_nid_postfix: unsupported MIB 1.37.
  • With this PR merged locally (59223717, clean):
    • Windows: PSBox renders steadily until the 60 s timeout, with no throw.
    • Linux: every import loads, and it runs until the headless DisplayWindow (the runner has no display).
  • On Windows guest_system_configuration fails at the same line 229 as on Linux (0xC0000409), so the errno reset above is needed on both. With that one line added locally it passes 5/5 on Linux. No warnings in SystemConfiguration.cpp or GuestSystemConfiguration.cpp.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6118318912 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3700#issuecomment-6118318912). Originally posted by [babyhuey](https://github.com/babyhuey) on 2026-10-12T05:27:28Z. --- PSBox (PPSA99810) results for this PR, with #3494 now on `main`: - `main` d146ec1b, Windows 11 (MinGW GCC 15.2): it creates its swapchain, then throws `sysctl_nid_postfix: unsupported MIB 1.37`. - With this PR merged locally (59223717, clean): - Windows: PSBox renders steadily until the 60 s timeout, with no throw. - Linux: every import loads, and it runs until the headless `DisplayWindow` (the runner has no display). - On Windows `guest_system_configuration` fails at the same line 229 as on Linux (`0xC0000409`), so the `errno` reset above is needed on both. With that one line added locally it passes 5/5 on Linux. No warnings in `SystemConfiguration.cpp` or `GuestSystemConfiguration.cpp`.
pushkarreddyy commented 2026-10-12 06:39:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-12T06:39:26Z.


Hi @babyhuey,

Thank you so much for the thorough verification across Linux and Windows 11 with PSBox Cloud Gaming (PPSA99810)!

The fix is now in on commit \d8b42473d:

  • Added *__error_nid_postfix() = 13;\ right after the line-221 write check to restore sentinel errno before the trailing line-229 assert, as suggested.
  • Cleanly rebased onto latest \origin/main\ (\2ccbd376f).
  • Verified \ ools/check_conventions.py --base origin/main\ passes with 0 comments.
  • Ready for re-run and merge into \main! Thank you!
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6119118239 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3700#issuecomment-6119118239). Originally posted by [pushkarreddyy](https://github.com/pushkarreddyy) on 2026-10-12T06:39:26Z. --- Hi @babyhuey, Thank you so much for the thorough verification across Linux and Windows 11 with *PSBox Cloud Gaming* (PPSA99810)! The fix is now in on commit \d8b42473d\: - Added \*__error_nid_postfix() = 13;\ right after the line-221 write check to restore sentinel errno before the trailing line-229 assert, as suggested. - Cleanly rebased onto latest \origin/main\ (\2ccbd376f\). - Verified \ ools/check_conventions.py --base origin/main\ passes with 0 comments. - Ready for re-run and merge into \main\! Thank you!
babyhuey commented 2026-10-12 07:22:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by babyhuey on 2026-10-12T07:22:30Z.


Confirmed on d8b42473, merged onto main 2ca6198e (9fce2f4f):

  • guest_system_configuration passes 5/5 (--repeat until-fail:5) on Linux and Windows 11, with no warnings in the PR's files.
  • PSBox (PPSA99810), Windows: it renders past the 60 s timeout.
  • PSBox, Linux: it runs until the headless DisplayWindow.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6119652818 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3700#issuecomment-6119652818). Originally posted by [babyhuey](https://github.com/babyhuey) on 2026-10-12T07:22:30Z. --- Confirmed on d8b42473, merged onto `main` 2ca6198e (9fce2f4f): - `guest_system_configuration` passes 5/5 (`--repeat until-fail:5`) on Linux and Windows 11, with no warnings in the PR's files. - PSBox (PPSA99810), Windows: it renders past the 60 s timeout. - PSBox, Linux: it runs until the headless `DisplayWindow`.
pushkarreddyy commented 2026-10-12 07:46:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-12T07:46:32Z.


Calling on @adriadam10 and @oneandonlydean for final review and merge into \main\ when ready:

  • Linux & Windows 11 Verification: @babyhuey confirmed complete pass with \guest_system_configuration\ 5/5 (--repeat until-fail:5) across both operating systems.
  • Title Evidence: PSBox Cloud Gaming (PPSA99810) unblocked and renders steadily past the 60 s timeout on Windows 11 without throwing, and advances to the display window on Linux.
  • CI & Conventions: 14/14 CI checks green and conventions 100% clean.

All requested checks are verified and ready for merge into \main! Thank you!

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6119984855 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3700#issuecomment-6119984855). Originally posted by [pushkarreddyy](https://github.com/pushkarreddyy) on 2026-10-12T07:46:32Z. --- Calling on @adriadam10 and @oneandonlydean for final review and merge into \main\ when ready: - **Linux & Windows 11 Verification**: @babyhuey confirmed complete pass with \guest_system_configuration\ 5/5 (\--repeat until-fail:5\) across both operating systems. - **Title Evidence**: *PSBox Cloud Gaming* (PPSA99810) unblocked and renders steadily past the 60 s timeout on Windows 11 without throwing, and advances to the display window on Linux. - **CI & Conventions**: 14/14 CI checks green and conventions 100% clean. All requested checks are verified and ready for merge into \main\! Thank you!
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!3700
No description provided.