Commit Graph
1625 Commits
Author SHA1 Message Date
Adrià 351e88bdc3 Merge pull request #12104 from MarcZX10/docs/debt-entries-match-code
docs(debt): correct eight entries that no longer match the code
2026-11-11 07:41:18 +01:00
Adrià 510d0bf986 Merge pull request #16677 from xXPBSXx/fix/kernel-gettimezone-null-output-v2
fix(kernel): sceKernelGettimezone returns 0 for a null output
2026-11-11 03:01:46 +01:00
Adrià 6ba0f3e58b Merge pull request #16596 from xXPBSXx/g/ps5-systemswversion
docs(libkernel): record PS5 firmware 11.60 values of sceKernelGetSystemSwVersion
2026-11-11 00:07:29 +01:00
Evan KleinandClaude Opus 5.5 21c7d78069 test(libkernel): register the exception fault test only where host faults are delivered
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 14:42:36 +01:00
Adrià 698b6ed121 Merge pull request #15870 from AlfaRojo/test/kqueue-pipe-write-full-windows
test(libkernel): cover the full pipe and drain of a kevent write event on Windows
2026-11-10 13:57:42 +01:00
Adrià 80a75599b4 Merge pull request #13506 from pushkarreddyy/fix/pthread-schedparam-efault
fix(libkernel): return EFAULT from pthread_getschedparam and pthread_setschedparam for invalid memory
2026-11-10 02:32:32 +01:00
JJenkx 56c7372672 chore: integrate current main for PR 14190 2026-11-09 14:25:15 -05:00
Superseabas d5991e699c Merge upstream main into feat/net-so-linger 2026-11-09 16:50:21 +00:00
AlfaRojo b652291df3 Merge remote-tracking branch 'upstream/main' into test/kqueue-pipe-write-full-windows
# Conflicts:
#	docs/dev/debt/libkernel.md
2026-11-09 09:23:48 -06:00
pushkarreddyy f76f8c0df9 docs(libkernel): clarify pthread schedparam debt contract per FreeBSD user space fault 2026-11-09 19:51:43 +05:30
pushkarreddyy f51d3b5998 docs(libkernel): record pthread_getschedparam and pthread_setschedparam memory validation contract 2026-11-09 19:51:43 +05:30
Dean d792f1ad5f Merge pull request #16437 from XatiX/fix/libkernel-measured-clock-einval
fix(libkernel): answer the clock ids a PS5 measured invalid as it does
2026-11-10 02:47:56 +13:00
MarcZX10 24cf8e1a42 docs(debt): note the EFAULT sceKernelGetSocPowerConsumption returns for a null buffer
The export returns SCE_KERNEL_ERROR_EFAULT for a null buffer before it
returns EINVAL, so the entry's statement that it always returns EINVAL
was incomplete.
2026-11-09 11:18:45 +00:00
Dean 6dea4f6af6 Merge pull request #16493 from sherySJ/agent/anyps5-sysarch
fix(libkernel): return EFAULT for a null sysarch XFPUSTATE argument as measured
2026-11-09 21:06:45 +13:00
Dean 993e807af9 Merge pull request #16243 from NevesHenry/feat/libkernel-resident-fmem-count
feat(libkernel): export sceKernelGetResidentFmemCount
2026-11-09 17:47:57 +13:00
Dean 41c7de453d Merge pull request #16174 from BunnyFl/fix/libkernel-map-direct-memory2-checks
fix(libkernel): check sceKernelMapDirectMemory2's flags and alignment as firmware 13.42 does
2026-11-09 16:52:35 +13:00
Dean df088d6df5 Merge pull request #16198 from MarcZX10/fix-kernel-mmap-null-output
fix(libkernel): return EFAULT from sceKernelMmap for an unusable output pointer
2026-11-09 14:15:48 +13:00
Dean 2f30067221 Merge pull request #4630 from mugurc/feat/libkernel-raise-exception-macos
feat(libkernel): sceKernelRaiseException on macOS hosts
2026-11-09 07:07:49 +13:00
SuperseabasandClaude Opus 5.5 6a2a4b6fc3 docs(libkernel): pin the FreeBSD link in the SO_LINGER datagram entry
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 16:52:50 +00:00
SuperseabasandClaude Opus 5.5 cb2e91dd63 Merge upstream main into feat/net-so-linger
Resolves the conflict in docs/dev/debt/libkernel.md: keeps the SO_LINGER
datagram entry beside main's rewritten connect to the unspecified
address entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 16:30:38 +00:00
XatiXandClaude Opus 5.5 90c86fb36a fix(libkernel): answer the clock ids a PS5 measured invalid as it does
clock_gettime and sceKernelClockGettime threw for every clock id they do
not map. PS5 measurements of both exports (firmware 11.60, a payload
process, #16437) settle ids 3, 6 and 16 to 31 but 20 and 21:

- ids 3, 6 and 22 to 31 fail with EINVAL before the result is written,
  as both exports did; the raw system call also failed them with EINVAL
  (CFI-1216A, firmware 12.00, #15725);
- ids 16 to 19 fail with EIO (errno 5, 0x80020005 from
  sceKernelClockGettime) before the result is written, as both exports
  did.

Ids 20 and 21 succeed on the console with a time from clocks the probes
do not identify, so they still throw; the debt entry records what was
read and closes when what they count is measured.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 14:05:17 +00:00
Dean Galvin 5ceb701561 revert(libkernel): back out the title instance lock and its release rename
Main's Windows patched_libraries test fails from the merge of #12970
(5bd71fb5bc): 15 modules, libSceSystemService among them, report
LoadLibraryEx error 127 (procedure not found). #17076 (212b75d984) renamed
the cross-library release call to a _nid_no_patch name but the same 15 modules
still fail on main push 42471325636, and its pull request run never ran
patched_libraries, so the rename was not shown to fix it.

Revert both merges as one change until the cause is found and shown
passing on Windows: 14 files from #12970 removed, the #17076 rename reverted
with them.
2026-11-09 00:24:37 +13:00
Adrià 49f3653632 Merge pull request #12170 from slopgobblercobbler/fix/libkernel-sigsuspend-efault-validation
fix(libkernel): return EFAULT from sigsuspend for null or unusable signal mask
2026-11-08 11:42:05 +01:00
Adrià 9594527a0c Merge pull request #7804 from mugurc/feat/libkernel-process-clock-macos
feat(libkernel): process, thread and clock queries on macOS hosts
2026-11-08 10:59:04 +01:00
Adrià 5bd71fb5bc Merge pull request #12970 from MarcZX10/feat/title-instance-lock
feat(libkernel): stop a second copy of a title with ANYPS5_INSTANCE_LOCK
2026-11-08 09:16:58 +01:00
Adrià 4188eb6f2b Merge pull request #13560 from SHOnnay/codex/feat-macos-pipe-write
feat(libkernel): support macOS pipe write readiness
2026-11-08 08:36:23 +01:00
Adrià 9bc5b2eabc Merge pull request #9684 from NevesHenry/fix/libkernel-page-aligned-thread-stacks
fix(libkernel): start thread stacks on a 16 KiB page boundary on Linux
2026-11-08 07:42:17 +01:00
Adrià 1ce5c1af58 Merge pull request #11939 from ionut27001/fix/libkernel-process-abi-type
feat(libkernel): implement sceKernelGetProcessAbiType
2026-11-08 07:40:13 +01:00
Dean Galvin 436f3abfca Merge branch 'main' 2026-11-08 18:16:33 +13:00
Dean 8eb293447e Merge pull request #15748 from Gruzzberry/fix/pthread-key-create-efault
fix(libkernel): return EFAULT for an unwritable pthread_key_create key pointer
2026-11-08 18:15:23 +13:00
Adrià 2ffc8da960 Merge pull request #15775 from root-over/fix/libkernel-multicast-join-no-interface
fix(libkernel): fail a multicast join no host interface takes with EADDRNOTAVAIL
2026-11-08 05:51:04 +01:00
Dean Galvin 043de2f4ad Merge branch 'main' 2026-11-08 17:29:07 +13:00
Dean Galvin 05294d6e77 Merge branch 'main' 2026-11-08 17:29:06 +13:00
Adrià 47ba34c571 Merge pull request #13587 from pushkarreddyy/fix/module-info-efault
fix(libkernel): return EFAULT from module info and list queries for invalid memory pointers
2026-11-08 05:19:02 +01:00
Adrià 57acba5736 Merge pull request #13504 from pushkarreddyy/fix/pthread-getcpuclockid-efault
fix(libkernel): return EFAULT from pthread_getcpuclockid for an unwritable clockId
2026-11-08 04:46:12 +01:00
Adrià d3ec2bb707 Merge pull request #15782 from Ragbie/fix/windows-connect-inaddr-any
fix(libkernel): connect and send to INADDR_ANY through 127.0.0.1 on Windows as FreeBSD reaches the local host
2026-11-08 00:41:18 +01:00
Adrià c3e4800f37 Merge pull request #15781 from fishingpvalues/fix/sysctl-mibs-ime-setter
feat(libs): resolve four sysctl names and stub the IME clause setter
2026-11-08 00:38:32 +01:00
Dean 9e47f0c3ac Merge pull request #15884 from zaryabzip/fix/kernel-ampr-event-bad-queue
fix(libkernel): return EBADF from sceKernelAddAmprEvent for an equeue that is not live
2026-11-08 12:04:03 +13:00
Adrià 65e79805b8 Merge pull request #15776 from root-over/test/libkernel-named-shm-noexec-skip
test(libkernel): skip executable named shm mappings where /dev/shm is noexec
2026-11-07 23:59:09 +01:00
slopgobblercobbler d40937466a fix(libkernel): return EFAULT from sigsuspend on null or unreadable mask
FreeBSD 11.4 sys_sigsuspend (sys/kern/kern_sig.c) copies the requested mask from userland via copyin() before kern_sigsuspend(). When the mask pointer is null or unreadable, the system call returns EFAULT (14) without blocking or touching signal masks. AnyPS5 previously threw std::invalid_argument on null, and dereferenced arbitrary pointers directly.

Validate the pointer with GuestCopyIn_nid_no_patch, returning -1 and setting errno to EFAULT (14) on null or bad address. Update tests in GuestSignals and GuestUnderscoreEntries to verify EFAULT on null and unreadable pointers, and update libkernel technical debt documentation.
2026-11-07 23:50:57 +01:00
Adrià c6cbb74467 Merge pull request #15562 from BunnyFl/feat/libkernel-equeue-kqueue-descriptor
feat(libkernel): make an equeue a kqueue descriptor as firmware 13.42 does
2026-11-07 23:49:39 +01:00
Dean 302864d48c Merge pull request #15849 from Nciibi/fix/libkernel-apr-guest-memory
fix(libkernel): check APR guest memory before the submit and command paths
2026-11-08 10:33:59 +13:00
ionut27001 a94b65925b feat(libkernel): implement sceKernelGetProcessAbiType
Returns 1 for the own pid and for -1, and 0 for pid 0, as a payload process on a PS5 (firmware 12.70) read (p86). Any other pid throws: another payload process got 0x80020003 for a stack pointer and an unspecified first argument (p85), and other existing pids were not tried. Adds a guest test and cuts the debt entry to what is still open.
2026-11-07 22:26:29 +01:00
Dean 142a252a50 Merge pull request #15794 from root-over/fix/libkernel-console-ucontext-layout
fix(libkernel): lay out user contexts as the console's getcontext writes them
2026-11-08 10:25:44 +13:00
Adrià 511b4f6fbd Merge pull request #15554 from Gruzzberry/fix/pthread-attr-posix-efault
fix(libkernel): fail pthread_attr getters and setters with EFAULT on an unusable pointer
2026-11-07 21:46:59 +01:00
Adrià 411718d8d9 Merge pull request #15556 from BunnyFl/fix/libkernel-module-call-arguments
fix(libkernel): check the module load and unload arguments as firmware 13.42 does
2026-11-07 21:46:21 +01:00
SAKIBUL HUDA ONNAY 53f80d22f6 feat(libkernel): support macOS pipe write readiness 2026-11-07 21:39:39 +01:00
MarcZX10 f9cf29a943 docs(debt): record why the instance lock is off by default
One statement of the instance lock's unverified behaviour, in its libkernel debt entry.
2026-11-07 21:37:40 +01:00
MarcZX10 82eb58f2d5 docs(debt): record the instance lock gap across a restart and self-started copies
One statement of the instance lock's unverified behaviour, in its libkernel debt entry.
2026-11-07 21:37:40 +01:00
MarcZX10 a0bda7eda2 docs(debt): record where the instance lock check runs at start-up
One statement of the instance lock's unverified behaviour, in its libkernel debt entry.
2026-11-07 21:37:40 +01:00