From 48413678fba28e403bdeaaa5bd49dbb46f45e09a Mon Sep 17 00:00:00 2001 From: xXPBSXx <20614131+xXPBSXx@users.noreply.github.com> Date: Fri, 27 Nov 2026 18:34:07 +0100 Subject: [PATCH] docs(debt): record that a PS5 does not check the key pointer of pthread_key_create Co-Authored-By: Claude Sonnet 5.5 --- .../debt/changes/fix-libkernel-pthread-key-create-guest-copy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/dev/debt/changes/fix-libkernel-pthread-key-create-guest-copy.md b/docs/dev/debt/changes/fix-libkernel-pthread-key-create-guest-copy.md index 6a4d5a33d01a..15ca1490e847 100644 --- a/docs/dev/debt/changes/fix-libkernel-pthread-key-create-guest-copy.md +++ b/docs/dev/debt/changes/fix-libkernel-pthread-key-create-guest-copy.md @@ -2,4 +2,4 @@ ## change [pthread_key_create] -- [pthread_key_create](../../../core/libs/prx/libkernel/Pthread/Posix/Tsd.cpp) (libkernel) - an unwritable key pointer fails with `EFAULT` and frees the key it had taken, where FreeBSD 11.4's [`_pthread_key_create`](https://github.com/freebsd/freebsd-src/blob/release/11.4.0/lib/libthr/thread/thr_spec.c) stores the key without a check and the process faults. This is a host-safety fallback with unmeasured console behaviour. A NULL key pointer keeps returning `EINVAL`. `scePthreadKeyCreate` writes the key the same way before it publishes the slot, so an unwritable key returns `0x8002000e` and takes no key. +- [pthread_key_create](../../../core/libs/prx/libkernel/Pthread/Posix/Tsd.cpp) (libkernel) - an unwritable key pointer fails with `EFAULT` and frees the key it had taken, where FreeBSD 11.4's [`_pthread_key_create`](https://github.com/freebsd/freebsd-src/blob/release/11.4.0/lib/libthr/thread/thr_spec.c) stores the key without a check and the process faults. A PS5 (firmware 11.60, payload process; a title process may differ) returned 0 for a writable key pointer and the process took SIGSEGV for a NULL pointer, a pointer to a PROT_NONE page and an unmapped page in one run, so the console checks none of them, and the `EFAULT` here is a host-safety result, not the console's. A NULL key pointer keeps returning `EINVAL` here, which is also a host-safety result; `scePthreadKeyCreate` was not run there. `scePthreadKeyCreate` writes the key the same way before it publishes the slot, so an unwritable key returns `0x8002000e` and takes no key.