Commit Graph
2622 Commits
Author SHA1 Message Date
Adrià 9eca75175e Merge pull request #13545 from pushkarreddyy/fix/page-table-stats-efault
fix(libkernel): return EFAULT from page table and trace memory stats for invalid memory
2026-10-31 03:16:52 +01:00
Adrià 4b7af94e1d Merge pull request #13537 from pushkarreddyy/fix/sendfile-efault
fix(libkernel): return EFAULT from sendfile for invalid memory pointers
2026-10-31 03:00:47 +01:00
Adrià 41d0d902cc Merge pull request #13532 from relativespace2K/feat/libkernel-kern-proc-proc
feat(libkernel): answer kern.proc.proc with the calling process
2026-10-31 02:57:46 +01:00
Adrià da88f4489a Merge pull request #13544 from cocoa55/fix/mutex-spin-yield-loops
fix(libkernel): spin and yield by the mutex spin and yield loop counts
2026-10-31 02:57:38 +01:00
pushkarreddyy a68bdf41b9 fix(libkernel): return EFAULT from page table and trace memory stats for invalid memory 2026-10-31 02:24:36 +01:00
Adrià a46b04dfe1 fix(libkernel): ignore unwritable sbytes in sendfile and bound iovec allocation 2026-10-31 02:16:45 +01:00
pushkarreddyy ed0892da42 fix(libkernel): return EFAULT from sendfile for invalid memory pointers 2026-10-31 02:16:33 +01:00
boykopovar 7fcab08f71 Merge pull request #13645 from boykopovar/fix/exception-delivery-race
fix(libkernel): exception delivery race
2026-10-31 01:18:00 +03:00
Adrià 9605300f29 Merge pull request #13503 from Oscar45397/fix/libkernel-map-unallocated-direct-memory
fix(libkernel): return ENOMEM when mapping unallocated direct memory
2026-10-30 22:56:33 +01:00
Adrià 48773cf610 Merge pull request #13443 from DeveshB-1/fix/write-throttling-efault
fix(libkernel): return EFAULT from sceKernelWriteThrottlingStatus for an unwritable store
2026-10-30 22:48:12 +01:00
Adrià db8f5671ab Merge pull request #13444 from DeveshB-1/fix/thermal-sensors-efault
fix(libkernel): return EFAULT from thermal sensor queries for unwritable stores
2026-10-30 22:18:45 +01:00
boykopovar 950b697477 fix(libkernel): preserve exception delivery ownership and alertable drains 2026-10-31 00:13:13 +03:00
mrph28 3b379b4435 feat(libkernel): answer kern.proc.proc with the calling process
MihawkOS (PPSA99170) reads sysctl {1, 14, 8, 0} while it starts and the
runtime throws on the unsupported MIB, which aborts the title.

KERN_PROC_PROC takes no pid, so the node lists the one guest process the
runtime hosts, as the same kinfo_proc kern.proc.pid already builds.

AI-assisted: yes
2026-10-30 18:06:58 -03:00
Adrià 7ad4f3bb9f Merge pull request #12986 from Oscar45397/test/libkernel-virtual-range-name
fix(libkernel): return EFAULT for a null virtual range name
2026-10-30 21:23:57 +01:00
Adrià c0fb4a6aad Merge pull request #13411 from DeveshB-1/fix/uuid-create-efault
fix(libkernel): return EFAULT from sceKernelUuidCreate and sceKernelCreateUuidV4 for unwritable stores
2026-10-30 21:14:40 +01:00
DeveshB-1 84e493242f fix(libkernel): return EFAULT from thermal sensor queries for unwritable stores 2026-10-30 20:51:08 +01:00
cocoa55andClaude Opus 5.5 32abcb15a0 fix(libkernel): try a mutex once before its spin and yield budget
FreeBSD's mutex_lock_common tries the lock before mutex_lock_sleep
spins or yields, so a free mutex with yield loops and no spins was
yielding before its first try here.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 15:30:54 -04:00
cocoa55andClaude Opus 5.5 9a7acb3677 fix(libkernel): spin and yield by the mutex spin and yield loop counts
Lock and timed lock now try the mutex up to the spin count with a pause
between tries, then up to the yield count with a yield before each try,
before they block, as FreeBSD 11.4's mutex_lock_sleep does. Trylock and
a lock the thread already holds do not spin. A uniprocessor host skips
the spins and keeps the yields.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 13:56:31 -04:00
Oscar45397andClaude Opus 5.5 06b7a58b1b fix(libkernel): return ENOMEM when mapping unallocated direct memory
Mapping a direct memory range that includes an unallocated physical
page threw std::invalid_argument and ended the process. It now returns
ENOMEM before anything is mapped, as shadPS4's MemoryManager::MapMemory
does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 18:06:45 +01:00
Oscar45397andClaude Opus 5.5 287f43e004 fix(libkernel): return EFAULT for a null virtual range name
KytyPS5 and shadPS4 return EFAULT for a null name. The test keeps that
and the rename and clear checks, and drops the null address, zero length
and past-the-end cases that no reference covers; the debt entry records
them as unknown, with the 32-byte name limit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 17:47:22 +01:00
Adrià 9304896d89 Merge pull request #12135 from Oscar45397/fix/libkernel-raise-short-sleep
fix(libkernel): deliver raises at the spin that ends a sleep on Windows
2026-10-30 17:05:05 +01:00
DeveshB-1 5553cbd447 fix(libkernel): return EFAULT from sceKernelWriteThrottlingStatus for an unwritable store 2026-10-30 20:14:03 +05:30
DeveshB-1 3a9719490f fix(libkernel): return EFAULT from sceKernelUuidCreate and sceKernelCreateUuidV4 for unwritable stores 2026-10-30 19:27:53 +05:30
Adrià 96ff704249 Merge pull request #12667 from xdCloudy/feat/libkernel-sys-pthread-attr-helpers
feat(libkernel_sys): implement mutex attribute generation helpers
2026-10-30 14:02:33 +01:00
Oscar45397andClaude Opus 5.5 03722a1570 fix(libkernel): deliver raises at the spin that ends a sleep on Windows
On Windows a sleep shorter than TimedWait's 0.5 ms lead, and the last 0.5 ms of a longer one, is a YieldProcessor spin in host code with no wait counted. A raise that found the target there could only be delivered through the return-address breakpoint or sampling, so sceKernelRaiseException at a thread looping on such sleeps was lost: a thread looping on sceKernelUsleep(200) lost the first raise in 5 of 5 runs.

The spins in SleepUntil and SleepNanosUnlessChanged now run under a DeliveryDeferral and drain APCs afterwards, as BeginPark and Unpark already do. A raise that finds the target spinning is queued as an APC and runs when the sleep ends.

GuestRaiseShortSleep raises 100 times each at a thread sleeping 100, 200 and 400 us in a loop, with sleep wakes on (SleepNanosUnlessChanged) and with APS5_NO_SLEEP_WAKE (SleepUntil). Both fail on main at the first or second raise.

AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 13:26:59 +01:00
Dean 5c0ee1bbf4 Merge pull request #11827 from oneandonlydean/carry/7268-cert-paths
feat(libkernel): provide system and common certificate list paths
2026-10-31 01:18:08 +13:00
Adrià 8304ccaedb Merge pull request #11341 from SteelCrab/review/emscripten-libraries
build(libs): support Emscripten memory64 compilation
2026-10-30 12:49:20 +01:00
Adrià 45d0ed5f35 Merge pull request #11725 from camezaro-intc/fix/libkernel-timedwait-busy-spin
fix(libkernel): prevent sub-millisecond timed wait busy-spinning on Windows
2026-10-30 12:44:23 +01:00
Dean Galvin 462c4ec0aa Merge main into PR #11827 2026-10-30 23:07:47 +13:00
DeveshB-1 9e5683dd8b fix(libkernel): return EFAULT from sched_getparam and sched_setparam for invalid memory 2026-10-30 15:05:54 +05:30
Adrià bcee950a9c Merge pull request #12467 from Buraddomoon/fix/udp-disconnect-local-address
fix(libkernel): clear reported local address after UDP disconnect
2026-10-30 10:18:49 +01:00
Cloudy d833429467 feat(libkernel_sys): implement pthread attribute helpers 2026-10-30 08:12:52 +01:00
Adrià e4f5516fd6 Merge pull request #12974 from MarcZX10/feat/host-game-mode
feat(libkernel): opt-in host game mode request (APS5_GAME_MODE)
2026-10-30 06:36:04 +01:00
Adrià 0a2cda921d Merge pull request #12933 from heditrigui/feat/libc-dprintf
feat(libc): implement dprintf and vdprintf
2026-10-30 06:33:00 +01:00
Adrià 5ba6b2b917 Merge pull request #12963 from JJenkx/windows/libkernel-raise-pending-until-resume
fix(libkernel): keep sceKernelRaiseException pending on a suspended thread on Windows
2026-10-30 06:32:05 +01:00
Adrià 8f21dd5a6a Merge pull request #12897 from AdnanKhan-ak47/fix/libkernel-thread-exit-signal-mask
fix(libkernel): leave other threads' signal masks alone when a thread exits through scePthreadExit
2026-10-30 06:30:49 +01:00
Adrià ad9001f9d2 Merge pull request #12865 from heditrigui/feat/libkernel-posix-madvise
feat(libkernel): implement posix_madvise
2026-10-30 05:52:23 +01:00
Adrià 0c9c5db748 Merge pull request #12690 from MarcZX10/feat/host-system-report
feat(agc): host system report and an actionable missing-Vulkan-feature message
2026-10-30 02:52:18 +01:00
pista 2c22b68133 fix(libs): reject unsupported WebAssembly module unwind queries 2026-10-30 10:50:57 +09:00
pista 2f49b2568d build(libs): validate current native and WebAssembly adapter sources 2026-10-30 10:50:57 +09:00
pista d64e85164b build(libs): let the system libraries compile with Emscripten
Emscripten targets wasm64 without x86 assembly, Linux-only headers or the
x87 long double. These changes add __EMSCRIPTEN__ paths beside the host
ones; native builds compile the same code as before.

- libc: long doubles in guest varargs and scanf go through
  GuestLongDouble, a plain copy where long double is the x87 format;
  APS5_EXPORT emits no assembler alias; the guest arena is one aligned
  allocation that zeroes pages when they are committed again; getifaddrs
  keeps its link-level entries on Linux; /proc lookups and the host
  stderr duplicate are left out.
- libkernel: file-backed mmap, EVFILT_VNODE watches, getcontext and
  setcontext throw; getdents replaces the raw getdents64 syscall;
  getdtablesize takes the resource limit alone.
- VideoOut leaves SDL, the display window and the HDR probe out,
  Sysmodule asks libkernel for unwind information and Net includes
  sys/time.h.
2026-10-30 10:50:57 +09:00
Adrià 87d938c650 Merge pull request #12556 from babyhuey/fix/sched-efault
fix(libkernel): return EFAULT from rtprio_thread and sched_rr_get_interval for a bad pointer
2026-10-30 02:32:23 +01:00
Adrià 2485cdefa3 Merge pull request #12538 from babyhuey/fix/utimes-efault
fix(libkernel): return EFAULT from the utimes family for an unreadable times array
2026-10-30 02:31:43 +01:00
Adrià ec709cede3 Merge pull request #12436 from milescoviello/fix/vm-loadavg
fix(libkernel): answer vm.loadavg with the host's load averages
2026-10-30 02:31:30 +01:00
Adrià 365f857609 Merge pull request #12427 from simnJS/feat/kernel-is-neo-mode
feat(libkernel_sys): answer sceKernelIsNeoMode from the param.sfo Neo-mode attribute
2026-10-30 02:30:27 +01:00
Adrià 28b490ea5c Merge pull request #12296 from JJenkx/windows/kernel-shm-mmap-checks
fix(libkernel): map Windows shared memory with the regular file checks
2026-10-30 02:04:04 +01:00
Adrià f9a8813b11 Merge pull request #12179 from p3n1cillin/claude/kernel-executable-module-handle
feat(libkernel): add sceKernelGetExecutableModuleHandle
2026-10-30 02:01:01 +01:00
Adrià 4725feb152 Merge pull request #11431 from p3n1cillin/claude/pthread-getaffinity-set-size
fix(libkernel): answer pthread_getaffinity_np for the console's 8- and 16-byte sets
2026-10-30 01:20:44 +01:00
Adrià 96613bba67 Merge pull request #12060 from Ragbie/fix/windows-directory-flock
fix(libkernel): lock directories with flock on Windows as FreeBSD does
2026-10-30 01:04:03 +01:00
Adrià 438cebf361 Merge pull request #10544 from maximilianfv/fix/libkernel-macos-datagram-disconnect
fix(libkernel): count a dissolved datagram association as disconnected on macOS
2026-10-30 01:03:08 +01:00