Commit Graph
3035 Commits
Author SHA1 Message Date
Dean 045eda43dc Merge pull request #12854 from slopgobblercobbler/fix/libkernel-mincore-error-parity
fix(libkernel): enforce FreeBSD 11.4 error precedence and vector copyout in mincore
2026-11-05 08:19:30 +13:00
Dean 5e2f04007b Merge pull request #9326 from erickerxhalli/feat/libkernel-mutex-prioceiling
feat(libkernel): implement pthread_mutex_getprioceiling and setprioceiling
2026-11-05 08:19:17 +13:00
Dean df721d53f2 Merge pull request #7192 from Jev1337/feat/libkernel-host-fault-exception-handlers
feat(libkernel): deliver host faults to sceKernelInstallExceptionHandler handlers
2026-11-05 08:19:08 +13:00
Dean 3288b21f88 Merge pull request #15370 from oneandonlydean/fix/windows-deferred-dependency-start
fix(relinker): restore the Windows deferral of #12621 and start deferred dependencies first
2026-11-05 08:18:30 +13:00
Dean 92cdaf6337 Merge pull request #11624 from Felipebmaitan/feat/windows-guest-gs-state
feat(libkernel): maintain per-thread guest GS bases on Windows
2026-11-05 06:35:52 +13:00
Dean 6863f295a9 Merge pull request #10749 from ycbuzi/refactor/siginterrupt-libc-internal
refactor(libSceLibcInternal): serve siginterrupt from libSceLibcInternal
2026-11-05 06:35:30 +13:00
Dean a7d4ba2186 Merge pull request #9948 from ntamas94/fix/ps4-net-sockinfo-kernel-sockets
fix(libSceNet): describe sockets made with socket() in sceNetGetSockInfo
2026-11-05 06:34:36 +13:00
Dean eaf2579d0a Merge pull request #9929 from sandivd/fix/libc-syslog-program-name
fix(libc): restore syslog program-name fallback
2026-11-05 06:34:29 +13:00
Dean 0db469c769 Merge pull request #9019 from yabanana/feat/kernel-sys-pwrite
feat(libkernel_sys): implement pwrite through the shared POSIX provider
2026-11-05 06:34:17 +13:00
Dean dd38a35e13 Merge pull request #15649 from hugodearaujo/fix/apr-priority-queues
fix(libkernel): give each APR submit priority its own queue
2026-11-04 21:31:36 +13:00
Dean Galvin ecfea85fcd Merge branch 'main' into fix/libc-syslog-program-name 2026-11-04 21:00:07 +13:00
Dean 0a15ebf864 Merge pull request #12149 from AlexFigas/feat/libc-underscore-setjmp
feat(libc): export _setjmp and _longjmp
2026-11-04 18:34:14 +13:00
Dean b593093818 Merge pull request #12146 from AlexFigas/feat/libc-shared-mutex
feat(libc): implement the _Smtx shared mutex calls over libkernel's rwlocks
2026-11-04 18:34:09 +13:00
Dean 5924ecf2df Merge pull request #7156 from Amoenus/codex/fix-wait-trace-empty-main47
fix(libkernel): omit inactive wait trace sites
2026-11-04 16:58:26 +13:00
hugodearaujo 93efef6ef8 test(libkernel): release a waiting APR buffer from a buffer at another priority 2026-11-03 20:15:59 -03:00
hugodearaujo 67a5104c52 fix(libkernel): give each APR submit priority its own queue 2026-11-03 20:15:59 -03:00
ntamas94 58e537db01 fix(libSceNet): refresh socket listing on SockInfoSource 2026-11-03 21:45:18 +01:00
Jevro1337andClaude Opus 5.5 8a564d6c67 test(libkernel): take the fault test's imports from the libkernel and libc API headers
The test declared sceKernelInstallExceptionHandler, sceKernelRemoveExceptionHandler
and longjmp_nid_postfix itself, the last with a void* buffer. Include the API
headers instead and keep the jump buffer as std::uint64_t, as the canonical
longjmp_nid_postfix(std::uint64_t*, int) takes it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-03 21:01:18 +01:00
Jevro1337andClaude Opus 5.5 2c7e139d93 perf(libkernel): find the object of a faulting address with _dl_find_object
dladdr1 searches the object's symbol table, which made every host fault
chained past an installed handler about 8 us slower on Linux. glibc 2.35
and later answer the same question with _dl_find_object, which is also
async-signal-safe; older glibc keeps dladdr1.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-03 21:01:18 +01:00
Jevro1337andClaude Opus 5.5 ab363feecc feat(libkernel): deliver host faults to sceKernelInstallExceptionHandler handlers
A handler installed for SIGILL, SIGFPE, SIGBUS or SIGSEGV now receives
the faults raised in title code instead of the process ending, with
mc_trapno, mc_addr and mc_err filled as FreeBSD 11's amd64 trap() does.
On Windows the crash reporter's vectored handler offers unclaimed faults
to libkernel, which redirects the thread to a stub that runs the handler
outside the exception dispatcher; on Linux chained host signal handlers
classify faults by REG_TRAPNO.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-03 21:01:15 +01:00
Dean beb03a06a1 Merge pull request #15436 from JJenkx/fix/linux-main-stack-adopted-attributes-20261103
fix(libkernel): refresh adopted thread bounds when entering the main stack
2026-11-04 08:13:16 +13:00
Dean 723ee06871 Merge pull request #14799 from chitters2004/perf/guarded-committed-read
perf(agc): read committed guest pages directly on Windows
2026-11-04 08:10:59 +13:00
Felipebmaitan a0cea87294 fix(libkernel): retain shared guest copy semantics in sysarch 2026-11-03 14:34:35 -03:00
Felipebmaitan 41bbc32070 chore: refresh GS state with current main 2026-11-03 14:34:25 -03:00
bluandClaude Opus 5.5 24497b2406 Merge branch 'main' into refactor/siginterrupt-libc-internal
Resolves docs/dev/debt/libkernel.md: main's sigaction entry (SIGPIPE outside Windows) and this branch's signal entry, which points to libSceLibcInternal for siginterrupt.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-03 10:23:38 -07:00
Dean 31ab214934 Merge pull request #11002 from SandstromPL/fix/libkernel-guest-sigpipe
fix(libkernel): let a guest ignore or catch SIGPIPE on Linux
2026-11-04 05:43:27 +13:00
Dean Galvin 778c69a47f fix(relinker): drop the stored start results when the outermost deferred load ends
A module started as a dependency or by the sweep kept its start result, so a later
load of it by the title returned that result instead of 0 (guest_deferred_module_*
failed in the Windows job with 'module start result').
2026-11-04 04:20:52 +13:00
Dean Galvin 2909af1d77 test(relinker): sweep with a module that fails to start, and log non-std failures
A swept module whose start throws is skipped with a log line, whatever it throws, and
the load that triggered the sweep, and later loads, still succeed.
2026-11-04 03:34:59 +13:00
Dean Galvin 331dcf74bf fix(relinker): skip a swept module that fails to start instead of failing the load 2026-11-04 03:34:16 +13:00
Dean Galvin 3bff46c0aa fix(relinker): make the deferred sweep wait-safe and start a swept trigger in order
Concurrent first loads now wait for the one sweep; a failed sweep is retried by the
next first load. The sweep no longer skips the module that triggered it, so a swept
module that depends on it starts after it, and the trigger keeps its start result.
2026-11-04 03:32:55 +13:00
Dean Galvin 29178b2917 fix(relinker): start the deferred modules others depend on at the first load of any deferred module
A deferred module that only another deferred module names (PSNCommon, needed by
PSNCore) started after the plugins that use it (SPFXUnityPlugin) and crashed
Soul Hackers 2 on Windows. The first title load of any deferred module now starts
every deferred module some module depends on, in dependency order, with that
load's start arguments, and logs the sweep. Boot is unchanged.
2026-11-04 03:29:14 +13:00
Dean Galvin d77d8bc98e fix(relinker): format the deferred start log inside the guarded start 2026-11-04 02:39:12 +13:00
Dean Galvin 62aec71ad8 fix(relinker): start what a deferred module the executable needs depends on, and log each deferred start
On Windows a module the executable needs or imports from stays deferred, but its
dependencies were deferred too and started only when the title loads it, so a title
that calls it first ran them uninitialised (Soul Hackers 2, #15370 rerun). They start
at startup again, as on main. The loader prints one line per deferred start.
2026-11-04 02:36:53 +13:00
JJenkx 4199ddb205 fix(libkernel): refresh adopted thread bounds when entering the main stack 2026-11-03 04:32:26 -05:00
Dean Galvin f17fd26885 Merge commit '4f41f4c375f5abb487dbd184fbc150f31994d762' into HEAD
# Conflicts:
#	docs/dev/debt/relinker.md
2026-11-03 21:17:37 +13:00
Dean 4f41f4c375 Merge pull request #15210 from Danigamer05/feat/libc-sce-v2-filesystem-calls-20261102
feat(libc): export the std::__sce_v2 filesystem calls
2026-11-03 21:12:18 +13:00
Dean 206e72c90b Merge pull request #15137 from pushkarreddyy/feat/libkernel-sandbox-app0-alias
feat(libkernel): alias title sandbox app0 path to application directory
2026-11-03 21:11:30 +13:00
Dean 805ce107ba Merge pull request #15109 from imellag/fix/libkernel-condition-clock-atomic-ref
fix(libkernel): read the condition clock through a non-const atomic_ref
2026-11-03 21:11:20 +13:00
Dean 8b82678900 Merge pull request #10025 from mehmetbayoglu/fix/libkernel-amm-prt-zero-page
fix(libkernel): map unbacked AMM PRT pages to one read-only zero page on Windows
2026-11-03 21:09:48 +13:00
Dean 91ca312437 Merge pull request #9242 from DavidSamir/feat/libkernel-sys-tcgetsid
feat(libkernel): implement tcgetsid
2026-11-03 21:09:31 +13:00
Dean a74a4c370c Merge pull request #14310 from XatiX/fix/libkernel-net-socket-forwards
fix(libkernel): forward socket calls on sceNetSocket descriptors to libSceNet
2026-11-03 21:08:43 +13:00
Dean 8835460b5e Merge pull request #7532 from hugodearaujo/fix/linux-guest-main-stack
fix(linux): enter the guest entry on a main stack at the console's address
2026-11-03 21:07:51 +13:00
Dean Galvin a39b825599 Merge commit 'd1ae628bc2f62459cce1e9872ba5632c938c71f2' into HEAD
# Conflicts:
#	docs/dev/debt/libkernel.md
2026-11-03 18:18:49 +13:00
Dean a03cc0dde6 Merge pull request #14885 from oneandonlydean/carry-7135
fix(libkernel): follow kern_cpuset for the base cpuset, level checks and interrupt targets
2026-11-03 18:14:20 +13:00
Dean b955001c4d Merge pull request #15030 from Gruzzberry/fix/sysctl-overcommit-eperm
fix(libkernel): fail a vm.overcommit write with EPERM
2026-11-03 18:13:26 +13:00
Dean 5f96abbcba Merge pull request #14940 from BunnyFl/fix/prime-shared-mutexes
fix(agc,libkernel): prime the host shared mutexes left unprimed on Windows
2026-11-03 18:12:18 +13:00
Dean e41879d2b7 Merge pull request #14876 from roboterspinne/fix/libkernel-ipv6-unspecified-connect
fix(libkernel): connect an AF_INET6 socket to ::1 when the address is unspecified, as FreeBSD does
2026-11-03 18:11:16 +13:00
Dean 7a3d08c1c3 Merge pull request #14875 from roboterspinne/fix/libkernel-tcp-multicast-address
fix(libkernel): fail bind and connect of a stream socket to a multicast address with EAFNOSUPPORT
2026-11-03 18:11:11 +13:00
Dean 165d818a8f Merge pull request #14874 from roboterspinne/fix/libkernel-path-name-too-long-errors
fix(libkernel): fail sce path calls with ENAMETOOLONG for a path of 1024 bytes or more
2026-11-03 18:11:05 +13:00
Dean 79b49a50c6 Merge pull request #14710 from ahmadmuj/fix/anyps5-apr-guest-copyout
fix(libkernel): return EFAULT from APR file size and stat queries for an unwritable output
2026-11-03 18:09:40 +13:00