Commit Graph
1068 Commits
Author SHA1 Message Date
Dean 74f6fa8e31 Merge pull request #10076 from JJenkx/windows/raise-host-backoff
fix(libkernel): give a raise target time to run between host-code samples
2026-10-24 00:45:09 +13:00
orezraeyandClaude Opus 5.5 af0ac7050a fix(libkernel): look the thread up before the priority range in scePthreadSetprio, as firmware 13.42 does
A finished or joined thread returns ESRCH for any priority, and scePthreadSetprio sets errno for a refused priority like pthread_setprio.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 08:39:41 -03:00
Yunus Shaikh ca39134f27 fix(libkernel): answer the measured rwlock type and mutex kind cases
BunnyFl measured these functions against firmware 13.42's libkernel and
libkernel_sys in the PR thread (behaviour only):

- pthread_rwlockattr_settype_np stores only types 1 and 2. Any other
  type, 0 included, and a null attribute or object return EINVAL and
  store nothing; type 0 was stored before.
- scePthreadMutexattrSetkind returns 0x8001FFFF, sceKernelError(-1), for
  a null attribute or object instead of throwing. Kinds 1 to 4 are set as
  before; other kinds still throw, since the firmware stores them
  unchecked and a mutex's behaviour with them is not measured.
- scePthreadMutexattrGetkind takes the attribute itself and returns
  sceKernelError of its kind, or 0x8001FFFF for a null one.
2026-10-23 04:39:14 -07:00
xXPBSXxandClaude Sonnet 5.5 cb20a0563c docs(debt): note how titles call inet_pton
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-23 13:02:04 +02:00
Daniele Giovane bc00fafac0 Merge main and address review for PR 9160 2026-10-23 12:45:54 +02:00
xXPBSXxandClaude Sonnet 5.5 e9b842569a docs(debt): shorten the sceKernelFtruncate title note below the entry length limit
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-23 12:37:11 +02:00
BunnyFlandClaude Opus 5.5 9aa0f22dc7 feat(libkernel): implement the system-ex version, lower-limit and trace memory queries
sceKernelGetSystemExVersion, sysKernelGetLowerLimitSysexVersion,
sysKernelGetLowerLimitUpdVersion and sceKernelGetTraceMemoryStats were
NotImplemented stubs in libkernel_sys. libkernel, libkernel_sys and
libkernel_web of firmware 13.42 answer them without asking the kernel:
empty strings, a zero version and zero statistics, with the null checks
and return codes the firmware uses, including the plain 22 of
sceKernelGetSystemExVersion.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 12:29:49 +02:00
orezraey e26d09b41d Merge remote-tracking branch 'origin/main' into docs/libkernel-sem-timedwait-measured-ps5 2026-10-23 06:55:19 -03:00
orezraey 5c7cdfda26 Merge remote-tracking branch 'origin/main' into fix/libkernel-close-standard-descriptors-measured-ps5 2026-10-23 06:55:14 -03:00
orezraey 8c2c979aec Merge remote-tracking branch 'origin/main' into fix/libkernel-posix-thread-attr-measured-ps5
# Conflicts:
#	docs/dev/debt/libkernel.md
2026-10-23 06:55:00 -03:00
orezraey 4ef70cafab Merge remote-tracking branch 'origin/main' into fix/libkernel-sysctl-system-measured-ps5 2026-10-23 06:54:23 -03:00
orezraey e2b87712dd Merge remote-tracking branch 'origin/main' into fix/libkernel-pthread-attr-measured-ps5 2026-10-23 06:54:13 -03:00
xXPBSXxandClaude Sonnet 5.5 b495f88512 docs(debt): note how a title calls sceKernelFtruncate
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-23 11:29:32 +02:00
Dean b3e42bd1eb Merge pull request #8359 from Ragbie/fix/windows-pwrite-append
fix(libkernel): append positioned writes on an O_APPEND descriptor on Windows
2026-10-23 22:23:57 +13:00
Dean Galvin 2f741e737f Merge main into feat/libkernel-underscore-socket-signal-entries 2026-10-23 22:00:32 +13:00
Dean fef15751e6 Merge pull request #8641 from Danigamer05/fix/libkernel-windows-birthtime
fix(libkernel): clamp Windows birth time when setting earlier timestamps
2026-10-23 21:49:21 +13:00
Dean 24331355f7 Merge pull request #9060 from ags-arnab/feat/net-ioctl
feat(libSceNet): implement sceNetIoctl
2026-10-23 21:48:24 +13:00
Dean dd5b2a3869 Merge pull request #9736 from LeandroLP23/feat/libkernel-kern-proc-env
feat(libkernel): answer kern.proc.env for the calling process
2026-10-23 21:47:33 +13:00
Dean Galvin cee93db419 Merge main into feat/kernel-sys-thread-queries 2026-10-23 21:45:17 +13:00
Dean 0dd46f1867 Merge pull request #8547 from Retr0G28/fix/connect-einprogress-windows
test(libkernel): require EINPROGRESS from a nonblocking connect in progress
2026-10-23 21:39:18 +13:00
JJenkxandClaude Opus 5.5 fcc01c57a6 fix(libkernel): give a raise target time to run between host-code samples
RaiseOn suspends the target, reads its context and, while it is in host
code, resumes it and samples again after SwitchToThread. On a 16-core
Ryzen 9 5950X (Windows 11 22H2) that resampled the writer of
guest_raise_in_host_code about every 10 us before it could run: in the
raise that hung, 4,989 samples over 50 ms all found it in ucrtbase, so
the 50 ms host-code limit ran out and the handler was redirected into
fwrite, where it deadlocked on the stream lock (the test timed out at
30 s on every run). In a passing raise the samples sat at one RIP for
14,695 of 14,703 samples and the raise took 145 ms.

Spin for 20 us before each new host-code sample, so the target gets to
leave host code. With that, guest_raise_in_host_code passes 5 of 5 runs,
no raise is redirected in host code, and the longest raise is 0.46 to
0.53 ms. Other samples keep SwitchToThread.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 04:32:33 -04:00
Dean f075f91737 Merge pull request #9314 from DavidSamir/feat/libkernel-sys-ktimer
feat(libkernel): implement SIGEV_NONE POSIX timers
2026-10-23 20:34:29 +13:00
Dean c31f139db4 Merge pull request #8890 from UnhealthyKraken/feat/libkernel-pthread-timedjoin
feat(libkernel): implement pthread_timedjoin_np
2026-10-23 20:05:52 +13:00
SebastianandClaude Opus 5.5 bb403de88f feat(libkernel): add missing pthread attribute accessors
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QnkpF2oEMofseVz9Z7WEAC
2026-10-23 06:27:49 +00:00
Dean c9edaff579 Merge pull request #9104 from Retr0G28/fix/sendfile-enotsock
fix(libkernel): return ENOTSOCK from sendfile on a descriptor that is not a socket
2026-10-23 19:25:35 +13:00
Retr0 0ca2e0b4e7 fix(libkernel): return ENOTCONN from getpeername once a socketpair peer closed
getpeername on a socketpair end returned the unnamed AF_UNIX address
even after the other end was closed. In FreeBSD 11, closing an end runs
uipc_detach, whose unp_disconnect and unp_drop clear SS_ISCONNECTED on
both stream and datagram ends, and kern_getpeername then fails with
ENOTCONN. Each end now keeps a weak reference to its peer's socket,
which expires when the peer's last descriptor, duplicates included, is
closed. shutdown leaves the ends connected, as soshutdown does.
2026-10-23 08:21:09 +03:00
Retr0 0f3d4bc9ee fix(libc): fail with ENOTDIR for a file named with a trailing slash on Windows
FreeBSD 11.4's lookup() (sys/kern/vfs_lookup.c) fails with ENOTDIR when
a path with a trailing slash ends at something that is not a directory.
On Windows a mount alias dropped the slash, and the host calls do not
report ENOTDIR for "file\", so unlink, rename and open acted on the file
or failed with EINVAL. Guest path resolution now rejects an existing
non-directory named with a trailing slash with ENOTDIR on every host, and
a mount alias keeps the slash on Windows as it does on Linux and macOS.
2026-10-23 08:21:01 +03:00
Arnab Ghosh 5dfa258d9f feat(libSceNet): implement sceNetIoctl 2026-10-23 10:07:18 +06:00
Yunus Shaikh 96c21c0d09 Merge main into feat/libkernel-sys-libthr-names
# Conflicts:
#	core/libs/CMakeLists.txt
2026-10-22 20:56:19 -07:00
Yunus Shaikh 6b75fb99f6 Merge main into fix/libkernel-udp-unreachable-port
# Conflicts:
#	docs/dev/debt/libkernel.md
2026-10-22 20:53:20 -07:00
Dean 9a030c2d50 Merge pull request #8537 from elieh999/fix/setrlimit-nproc
fix(libkernel): store the process resource limit
2026-10-23 16:44:35 +13:00
Dean ee8a7349b5 Merge pull request #9265 from HQasper/claude/project-thread-6o4na3
feat(libkernel): implement pthread_rwlock_reltimedrdlock_np and pthread_rwlock_reltimedwrlock_np
2026-10-23 16:05:37 +13:00
Dean Galvin 2f45a312d0 Merge main into fix/setrlimit-nproc 2026-10-23 15:50:49 +13:00
Dean 00439857cb Merge pull request #9840 from Dom3005/fix/fstatfs-character-device
fix(libkernel): answer fstatfs on a character device as devfs does
2026-10-23 15:33:35 +13:00
orezraeyandClaude Opus 5.5 eb838e354d docs(libkernel): keep the edited debt entry under 1000 characters
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 23:00:52 -03:00
orezraeyandClaude Opus 5.5 77e4337f59 docs(libkernel): keep the edited debt entry under 1000 characters
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 23:00:35 -03:00
orezraeyandClaude Opus 5.5 49604e0556 docs(libkernel): keep the edited debt entry under 1000 characters
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 23:00:33 -03:00
orezraey 40f1d631e0 Merge remote-tracking branch 'origin/main' into docs/libkernel-sem-timedwait-measured-ps5 2026-10-22 22:51:29 -03:00
orezraey 216014c846 Merge remote-tracking branch 'origin/main' into fix/libkernel-close-standard-descriptors-measured-ps5 2026-10-22 22:51:28 -03:00
orezraey 369794719f Merge remote-tracking branch 'origin/main' into fix/libkernel-posix-thread-attr-measured-ps5 2026-10-22 22:51:26 -03:00
orezraey 5b546c61f7 Merge remote-tracking branch 'origin/main' into fix/libkernel-sysctl-system-measured-ps5 2026-10-22 22:51:25 -03:00
orezraey 1ca1d0f3ed Merge remote-tracking branch 'origin/main' into fix/libkernel-pthread-attr-measured-ps5 2026-10-22 22:51:23 -03:00
orezraeyandClaude Opus 5.5 ba53bd1975 fix(libkernel): set errno for an out-of-range pthread_setprio as measured on a PS5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 22:32:49 -03:00
orezraeyandClaude Opus 5.5 e663b1f7c0 fix(libkernel): report the inheritance through pthread_attr_get_np too
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 22:31:57 -03:00
Dean Galvin ee8d1fe266 Merge main into fix/sigaction-ignore-discards-pending 2026-10-23 14:11:53 +13:00
Dean 39e971a2ea Merge pull request #8985 from MarcZX10/codex/groups-pointer-safety
fix(libkernel): return EFAULT for invalid group pointers
2026-10-23 14:05:39 +13:00
orezraeyandClaude Opus 5.5 791990ad3e fix(libkernel): check the event flag name before the output as measured on a PS5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 21:37:07 -03:00
orezraeyandClaude Opus 5.5 bebdfb9003 docs(libkernel): record sem_timedwait timeouts as measured on a PS5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 21:29:10 -03:00
orezraeyandClaude Opus 5.5 2c92b0f662 fix(libkernel): refuse closing the standard descriptors with EPERM as measured on a PS5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 21:26:24 -03:00
orezraeyandClaude Opus 5.5 bc23ed7853 fix(libkernel): follow the thread priority ranges and POSIX attribute errors measured on a PS5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 21:12:32 -03:00