Commit Graph
461 Commits
Author SHA1 Message Date
Adrià 22782795a9 Merge pull request #10853 from krishalivaibhav/fix/macos-open-create-directory
fix(libkernel): refuse O_CREAT on an existing directory with EISDIR on macOS
2026-10-27 06:18:28 +01:00
Adrià b986c11a34 Merge pull request #10543 from maximilianfv/fix/libkernel-macos-append-positioned-writes
fix(libkernel): append positioned writes on an O_APPEND descriptor on macOS
2026-10-27 04:52:27 +01:00
Dean f423468b43 Merge pull request #11339 from harisibrar1/fix/lseek-pipe-negative-espipe
fix(libkernel): fail lseek on a pipe with ESPIPE for a negative offset on Windows
2026-10-27 11:08:02 +13:00
Dean d9c7bb5ffe Merge pull request #11242 from parl0v/fix/epoll-kernel-sockets
fix(libSceNet): register libkernel sockets with sceNetEpollControl
2026-10-27 11:05:08 +13:00
Dean 0bad0fc46a Merge pull request #11218 from Gruzzberry/fix/lutimes-enotdir
fix(libkernel): lutimes reports ENOTDIR for a path through a file
2026-10-27 11:03:44 +13:00
Dean 5dd28e5682 Merge pull request #11135 from orezraey/fix/libkernel-dupfd-cloexec-measured-ps5
fix(libkernel): fail F_DUPFD_CLOEXEC and make F_DUP2FD_CLOEXEC ignore its target as measured on a PS5
2026-10-27 11:01:17 +13:00
Dean 26bbcd1b48 Merge pull request #11288 from Gruzzberry/fix/fchmodat-follow-links
fix(libkernel_sys): fchmodat follows a symbolic link like chmod
2026-10-27 10:40:54 +13:00
Dean 29b9c07b6b Merge pull request #11040 from harisibrar1/fix/pipe-write-epipe-windows
fix(libkernel): fail a write to a pipe without a reader with EPIPE on Windows
2026-10-27 10:36:08 +13:00
Dean fd75cc804d Merge pull request #9095 from mazen320/fix/unlinkat-windows-junction
fix(libkernel): treat Windows junctions in unlinkat like unlink and rmdir
2026-10-27 10:29:02 +13:00
Adrià Franch 8676daa0fc merge: sync archive directories with main 2026-10-26 12:02:23 +01:00
Adrià FranchandClaude Sonnet 5.5 654eadd7f5 merge: sync archive directories with main
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-26 10:50:37 +01:00
SimoneandClaude Opus 5.5 88e86a7de1 fix(libkernel): check vector I/O lengths and descriptors before offsets
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-26 10:45:00 +01:00
Dean 27c2794a66 Merge pull request #8726 from ArjenS-LA/fix/windows-directory-link-types
fix(libkernel): classify Windows directory links by app0 scope
2026-10-26 20:36:06 +13:00
Dean ae3ec59aba Merge pull request #10734 from imellag/refactor/libkernel-rename-dead-dot-checks
refactor(libkernel): drop the unreachable dot checks after sceKernelRename's return
2026-10-26 19:58:55 +13:00
harisibrar1andClaude Opus 5.5 60b5b9b7ab fix(libkernel): fail lseek on a pipe with ESPIPE for a negative offset on Windows
NativeLseek seeked first and only checked for a pipe when the host seek
succeeded, so a negative offset reached the guest as EINVAL from
_lseeki64. FreeBSD 11.4's kern_lseek returns ESPIPE for any seek on a
descriptor without DFLAG_SEEKABLE, so the pipe check now comes first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-26 00:19:36 -04:00
orezraeyandClaude Opus 5.5 85a1bf2b31 Merge main into fix/libkernel-dupfd-cloexec-measured-ps5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 23:27:02 -03:00
Adrià 3b252b44fe Merge pull request #9561 from DavidSamir/feat/libkernel-fcntl-osync
feat(libkernel): sync each write on a file whose O_FSYNC flag is set
2026-10-26 02:26:06 +01:00
qpavyros 9b2dd8dce9 merge: sync archive follow-up with main 2026-10-26 01:53:02 +02:00
GruzzberryandClaude Sonnet 5.5 7322a3b9f8 fix(libkernel_sys): fchmodat follows a symbolic link like chmod
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-25 23:50:43 +00:00
qpavyros bebe28593d fix(libkernel): preserve native directory metadata 2026-10-26 01:33:46 +02:00
Adrià efd368fec6 Merge pull request #9469 from Gruzzberry/fix/chflags-dangling-link
fix(libkernel): fail chflags through a dangling Windows symbolic link with ENOENT
2026-10-26 00:13:50 +01:00
qpavyros 6105be4431 merge: sync archive directories with main 2026-10-26 01:10:12 +02:00
Josip Parlov 3cbd5a4be3 fix(libkernel): retire epoll registrations of a socket closed with sceKernelClose 2026-10-25 23:35:48 +01:00
GruzzberryandClaude Sonnet 5.5 4dc65b0c6f fix(libkernel): lutimes reports ENOTDIR for a path through a file
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-25 21:34:25 +00:00
orezraeyandClaude Opus 5.5 0868498fc2 fix(libkernel): make F_DUP2FD_CLOEXEC duplicate without the target as measured on a PS5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 18:04:25 -03:00
orezraey ea98a6e5f1 fix(libkernel): fail F_DUPFD_CLOEXEC with EOPNOTSUPP as measured on a PS5 2026-10-25 18:04:25 -03:00
Adrià 065d5dba6a Merge pull request #9502 from GitamarT045T3R/fix/libkernel-fchmod-pipe
fix(libkernel): fail fchmod on a pipe with EINVAL like FreeBSD
2026-10-25 21:03:23 +01:00
Maz f6c24fc271 fix(libkernel): remove a Windows directory junction without emptying its target
rmdir followed the junction and reported ENOTEMPTY, and unlink treated it as a real directory, so a junction to a non-empty folder could not be removed.
2026-10-26 00:02:20 +04:00
GruzzberryandClaude Opus 5.5 720cf7e296 fix(libkernel): fail chflags through a dangling Windows symbolic link with ENOENT
std::filesystem::status does not follow a Windows symbolic link under
MinGW, so the lookup chflags makes saw a link whose target is missing as
an existing file and returned 0. A reparse point in the last component
is now looked up through the target with the guest stat, as FreeBSD 11.4's
namei follows it: a missing target gives ENOENT, and a trailing slash
after a link to a file gives ENOTDIR.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 19:58:17 +01:00
Adrià 506991994d Merge pull request #9496 from Gruzzberry/fix/open-excl-symbolic-link
fix(libkernel): fail open with O_CREAT and O_EXCL on a Windows symbolic link
2026-10-25 18:35:57 +01:00
Adrià 2e1c72239b Merge pull request #9487 from Gruzzberry/fix/chmod-symbolic-link
fix(libkernel): follow a Windows symbolic link in chmod
2026-10-25 18:25:24 +01:00
Adrià Franch df0bfbee90 fix(libkernel): drop the duplicate sceKernelFsync declaration 2026-10-25 17:14:58 +01:00
David 60603545ff fix(libkernel): keep the writev sync guard out of std::optional
Destroying a std::optional is noexcept in libstdc++, so a failing sync in
the guard's destructor ended the process with std::terminate instead of
raising the sync error. The Windows writev and pwritev path now uses a
plain guard, which does nothing for -1. The debt line names the synced
write calls and leaves out the AIO writes.
2026-10-25 17:13:09 +01:00
David a81fcbfacd feat(libkernel): sync each write on a file whose O_FSYNC flag is set
FreeBSD's F_SETFL may change O_FSYNC (FCNTLFLAGS), and vn_write then
writes with IO_SYNC. The flag now lives in the status table, and the
write entry points sync a regular file after the write while it is set.
2026-10-25 17:13:01 +01:00
harisibrar1andClaude Opus 5.5 aebd8881d4 fix(libkernel): fail a write to a pipe without a reader with EPIPE on Windows
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 10:27:58 -04:00
Yunus Shaikh 20ae347f6a Merge main into fix/libkernel-lstat-relinked-prx
Main's #9618 has lstat fill a local FileStat and copy it out to the guest.
The merge keeps that and this branch's module lookup in the same call, so an
original .prx name still resolves to its relinked .guest.prx.
2026-10-25 03:56:39 -07:00
Adrià 35d22d88f9 Merge pull request #9618 from xXPBSXx/fix/output-structs-efault
fix(libkernel): fail the stat family with EFAULT when the output struct is not writable guest memory
2026-10-25 11:52:20 +01:00
Adrià 16025845e5 Merge pull request #9423 from AliZedan1A/fix/guest-path-efault
fix(kernel): safely copy guest path arguments
2026-10-25 10:48:00 +01:00
ali zedan 2c5fcf6406 fix(kernel): safely copy guest path arguments 2026-10-25 08:28:09 +01:00
xXPBSXxandClaude Sonnet 5.5 6457edc2fb fix(libkernel): fail fcntl F_DUPFD with EINVAL when the minimum descriptor is beyond the open file limit on Windows
fcntl(fd, F_DUPFD, min) with min at or above RLIMIT_NOFILE duplicated the
descriptor repeatedly until the CRT table was full and then failed with
EMFILE, after opening thousands of descriptors. FreeBSD checks the minimum
first: kern_dup returns EINVAL for FDDUP_FCNTL when new < 0 or
new >= maxfd (sys/kern/kern_descrip.c:836-840). Linux already answers
EINVAL through the host fcntl. Check the minimum against the guest
RLIMIT_NOFILE before the Windows loop.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-25 01:52:31 +02:00
Dean Galvin 7664003be2 Merge main (check commit for the public_headers fix) 2026-10-25 12:43:33 +13:00
xXPBSXxandClaude Sonnet 5.5 83f28bd67f fix(libkernel): fail the stat family with EFAULT when the output struct is not writable guest memory
fstat, _fstat, sceKernelFstat, stat, lstat, sceKernelStat and _fstatfs
filled the caller's struct in place, or copied into it after a check that
only tests for null, so a pointer into unmapped memory crashed the host.
Fill a local struct and copy it out with a checked write that fails with
EFAULT. FreeBSD 11.4 does the same after the lookup has succeeded:
copyout(&ub, uap->sb) in sys_fstat (sys/kern/kern_descrip.c:1328),
copyout(&sb, uap->ub) in sys_stat (sys/kern/vfs_syscalls.c:2066) and
copyout(sfp, uap->buf) in sys_fstatfs (sys/kern/vfs_syscalls.c:337).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-25 01:08:01 +02:00
boykopovar f38d29fd08 refactor(sdk): add canonical headers for remaining libraries 2026-10-24 23:17:42 +03:00
Emanuele 6e97cdd3e5 refactor(libkernel): drop the unreachable dot checks after sceKernelRename's return 2026-10-24 21:55:02 +02:00
qpavyros 0a64d23bdf feat(libkernel): enumerate archived app directories
Squashed onto current main, resolving the fchflags/fstatfs conflict with the kqueue guards.
2026-10-24 20:18:05 +02:00
ed61cbd11b fix(libkernel): refuse O_CREAT on an existing directory with EISDIR on macOS
Darwin opens an existing directory for O_CREAT without O_EXCL, while FreeBSD
and Linux fail with EISDIR. Close the descriptor and report EISDIR so
sceKernelOpen and open behave the same on every host.

Co-authored-by: Himansh Raj <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-24 23:36:14 +05:30
Adrià 6b496aa1d1 Merge pull request #7299 from qpavyros/codex/windows-named-shm
feat(libkernel): support named shared memory on Windows
2026-10-24 19:42:16 +02:00
Dean d003e64fcf Merge pull request #9099 from aarushkha/feat/libkernel-equeue-regular-file-events-v2
feat(libkernel): answer sceKernelAddReadEvent and sceKernelAddWriteEvent on regular files
2026-10-25 06:33:30 +13:00
954a8e1a9d fix(libkernel): append positioned writes on an O_APPEND descriptor on macOS
macOS pwrite and pwritev write at the given offset even when the
descriptor was opened with O_APPEND. FreeBSD's vn_write appends to an
O_APPEND regular file whatever the offset and leaves the file offset
unchanged, and Linux pwrite appends too. On macOS, sceKernelPwrite,
pwrite, sceKernelPwritev, pwritev and the AIO write commands now append
such writes with writev and restore the file offset, as #8359 does on
Windows.

Co-authored-by: Himansh Raj <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 05:34:28 -03:00
Dean 68871895d4 Merge pull request #9256 from Dom3005/fix/windows-fcntl-append
fix(libkernel): change O_APPEND on a Windows file through fcntl
2026-10-24 16:37:06 +13:00