Commit Graph
441 Commits
Author SHA1 Message Date
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
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
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
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
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
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
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
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
Dean 88d4f1662c Merge pull request #10020 from Queuse/codex/keep-host-diagnostics-unbuffered
fix(libc): isolate host diagnostics from guest buffering
2026-10-24 15:22:01 +13:00
Dom3005andClaude Opus 5.5 dd6220698a fix(libkernel): change O_APPEND on a Windows file through fcntl
fcntl(F_SETFL) threw when it changed O_APPEND on a Windows file. The
guest flag already chooses WriteAtEnd, but a descriptor opened with
O_APPEND also carries the CRT's append flag, so _write kept appending
after the guest cleared it. F_SETFL now replaces the CRT descriptor of
every descriptor sharing the open file's status with a duplicate handle
opened with or without _O_APPEND, as libc fdopen does for append mode.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 02:28:14 +02:00
Dean a3cf44c558 Merge pull request #10111 from xXPBSXx/fix/fchflags-kqueue-einval
fix(libkernel): fail fchflags on a kqueue descriptor with EINVAL
2026-10-24 12:54:38 +13:00
Queuze d43043b6e5 chore: sync contribution #10020 with main 2026-10-23 20:02:15 -03:00
Dean Galvin a2ee2958a5 Merge main into fix/fcntl-getfl-pipe-rdwr 2026-10-24 09:07:08 +13:00
Dean 4f3087c677 Merge pull request #10136 from orezraey/fix/libkernel-close-standard-descriptors-measured-ps5
fix(libkernel): refuse closing the standard descriptors with EPERM as measured on a PS5
2026-10-24 03:23:15 +13:00
GruzzberryandClaude Opus 5.5 3cd6a37bfb fix(libkernel): fail open with O_CREAT and O_EXCL on a Windows symbolic link
FreeBSD 11.4's vn_open_cred does not follow the last component when
O_EXCL is set, so O_CREAT|O_EXCL on a symbolic link fails with EEXIST
whatever it points to. On Windows the host open followed a dangling link
and created its target. A reparse point in the last component now fails
O_CREAT|O_EXCL with EEXIST before the host open.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 14:40:23 +01:00
GruzzberryandClaude Opus 5.5 4e5db13927 fix(libkernel): follow a Windows symbolic link in chmod
_wchmod changes the read-only attribute of the path it is given, so on
Windows chmod through a symbolic link changed the link and left the file
it names unchanged, and a dangling link succeeded. A reparse point is now
opened through its target and the target's path is changed, as FreeBSD
11.4's sys_chmod passes FOLLOW: a missing target fails with ENOENT and a
link loop with ELOOP. The path lookup of a handle moves out of
WindowsDescriptorPath_nid_no_patch so both use it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 14:40:15 +01:00
Dean Galvin 6747c5b996 Merge main into fix/fcntl-getfl-pipe-rdwr 2026-10-24 02:10:48 +13:00
Dean 06fd07ab4a Merge pull request #8700 from nikowolf123/feat/libkernel-underscore-socket-signal-entries
feat(libkernel): export the underscore entry points of the socket, directory and signal calls
2026-10-24 00:53:04 +13:00
xXPBSXxandClaude Sonnet 5.5 5b739d2b56 fix(libkernel): fail fchflags on a kqueue descriptor with EINVAL
FreeBSD resolves the descriptor with getvnode in sys_fchflags
(vfs_syscalls.c:2403), which fails with EINVAL for a descriptor that has no
vnode. fchflags threw for a kqueue descriptor instead.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-23 12:28:27 +02: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
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 a75292c7b3 Merge pull request #8687 from cadenasynyster/fix/win-loop-errors
fix(libkernel): report ELOOP from unlink, mkdir, rmdir, truncate on Windows
2026-10-23 21:08:52 +13:00
Queuze 7358bec9ff fix(libc): isolate host stream buffering 2026-10-23 01:22:23 -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
Dom3005andClaude Opus 5.5 93ab8d3514 fix(libkernel): answer fstatfs on a character device as devfs does
FreeBSD keeps every character device on devfs, whose devfs_statfs reports
512-byte blocks, 2 blocks and nothing free. Windows threw for any console,
NUL or the guest random device, and Linux described the host's /dev mount.
A kqueue now returns EINVAL, as getvnode does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 23:06:03 +02:00
Adrià a6fc8a467d Merge pull request #8797 from xXPBSXx/fix/unlink-rmdir-dot-component
fix(libkernel): fail unlink and rmdir of a path that ends in a dot component with EINVAL
2026-10-22 20:40:44 +02:00