Commit Graph
182 Commits
Author SHA1 Message Date
Adrià 7a01e6a494 Merge pull request #9693 from Gruzzberry/feat/setlogin
feat(libkernel_sys): implement setlogin
2026-10-26 12:46:59 +01:00
Adrià e796ed4e5e Merge pull request #9632 from EagleBearerYS/feat/libkernel-sys-libthr-names
feat(libkernel): add pthread_rwlockattr_settype_np and scePthreadMutexattrSetkind
2026-10-26 11:20:50 +01:00
GruzzberryandClaude Opus 5.5 d49b9b6f25 feat(libkernel_sys): implement setlogin
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-26 09:26:45 +00:00
Dean 8100e480f7 Merge pull request #11186 from camezaro-intc/feat/libkernel-sys-load-start-sysmodule
feat(libkernel_sys): forward sceKernelLoadStartModuleForSysmodule to sceKernelLoadStartModule
2026-10-26 22:09:58 +13:00
Dean e5759e7ee6 Merge pull request #10524 from YossiYad/feat/kernel-sys-console-identity
feat(libkernel_sys): implement sceKernelIsCEX, sceKernelIsDevKit, get_authinfo and sceKernelGetOpenPsIdForSystem
2026-10-26 17:37:52 +13:00
Dean 8cdcd6de0e Merge pull request #8457 from vaibhavindalia/fix/fchown-guest-permissions
fix(libkernel_sys): validate descriptor first in fchown
2026-10-26 16:30:35 +13:00
Dean 853ffe0f69 Merge pull request #10794 from slopgobblercobbler/feat/kernel-sys-sce-pthread-main
feat(libkernel_sys): implement scePthreadMain through pthread_main_np
2026-10-26 14:27:16 +13:00
vaibhavindalia a385eee97c fix(libkernel_sys): validate descriptor first in fchown 2026-10-26 06:34:33 +05:30
Adrià d19a809639 Merge pull request #9682 from Gruzzberry/feat/settimeofday
feat(libkernel_sys): implement settimeofday
2026-10-25 23:04:11 +01:00
camezaro-intc 1257830a26 feat(libkernel_sys): forward sceKernelLoadStartModuleForSysmodule to sceKernelLoadStartModule 2026-10-25 14:56:34 -06:00
Yunus Shaikh 3a47ea6ea4 Merge main into feat/libkernel-sys-libthr-names
Main's #9573 implements scePthreadResume right after the
scePthreadMutexattrSetkind stub this branch removes from libkernel_sys;
the merge takes main's scePthreadResume and leaves the stub out.

Main's public-header audit wants one header declaration per export, so
the merge declares this branch's scePthreadMutexattrSetkind,
scePthreadMutexattrGetkind and pthread_rwlockattr_settype_np in
libkernel's Api.hpp, drops their stub declarations from libkernel_sys's
Api.hpp, has Mutex.cpp take sceKernelError from libkernel's Api.hpp,
and has the test include the libkernel headers instead of its own
declarations.
2026-10-25 12:49:51 -07:00
Adrià aeff26bd97 Merge pull request #9573 from zaryabzip/feat/pthread-create-suspended
feat(libkernel_sys): create threads suspended and resume them
2026-10-25 20:21:07 +01:00
Adrià 08f2d02a56 Merge pull request #9171 from DavidSamir/feat/libkernel-sys-getlogin-futimesat
feat(libkernel): implement getlogin
2026-10-25 17:54:15 +01:00
zaryabzip 0b60e97834 feat(libkernel_sys): create threads suspended and resume them
Implement pthread_attr_setcreatesuspend_np, pthread_resume_np,
pthread_resume_all_np and pthread_multi_np with the sce forms
scePthreadAttrSetcreatesuspend, scePthreadResume, scePthreadResumeAll
and scePthreadMulti, following FreeBSD 11.4 libthr and the firmware
13.42 libkernel_sys module. A thread created suspended waits before its
start routine, outside any cancellation point, until it is resumed.
sceKernelRaiseException throws on Windows for a thread still suspended
at creation.
2026-10-25 21:51:02 +05:00
Adrià 355dd435e4 Merge pull request #9379 from DavidSamir/feat/libkernel-sys-swapcontext
feat(libkernel): implement swapcontext
2026-10-25 16:16:48 +01:00
Adrià FranchandClaude Sonnet 5.5 f63b27bdaa feat(libkernel): implement getlogin
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-25 15:07:38 +01:00
GruzzberryandClaude Opus 5.5 e6b07323de feat(libkernel_sys): implement settimeofday
FreeBSD 11.4's kern_settimeofday rejects a timeval with a microsecond
field outside 0 to 999999 or a negative second field with EINVAL before
changing anything, sets the clock from a valid timeval, and then stores
the timezone, which gettimeofday reports. settimeofday now checks the
timeval the same way and throws for a valid one, as clock_settime does,
because the host clock is not changed. A timezone given without a
timeval is stored and gettimeofday reports it instead of 0 and 0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 13:20:31 +00:00
Adrià 460d46c4e8 Merge pull request #9172 from hypermoist/fix/kernel-sys-firmware-constants
fix(libkernel_sys): return what the firmware returns from 20 calls it does not implement
2026-10-25 13:31:30 +01:00
Adrià FranchandClaude Sonnet 5.5 3bf3f7928b fix(libkernel): declare swapcontext in libkernel's Api.hpp
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-25 13:04:17 +01:00
David 5881575782 refactor(libkernel): export swapcontext from libkernel directly
The PS5 3.20 export lists have swapcontext in libkernel as well as
libkernel_sys, and on Windows a libkernel import never reaches
libkernel_sys. The assembly entry in UserContext.cpp now is
swapcontext_nid_postfix, and the libkernel_sys jump stub is gone.
2026-10-25 13:04:08 +01:00
David ad0d4f5995 feat(libkernel_sys): implement swapcontext 2026-10-25 13:04:08 +01:00
Yossi Yadgar 803601ffa4 fix(libkernel_sys): publish identity types and reject null system IDs 2026-10-25 13:08:55 +02:00
Yossi Yadgar afa6f6dcbc feat(libkernel_sys): return the OpenPSID from sceKernelGetOpenPsIdForSystem 2026-10-25 13:06:28 +02:00
Yossi Yadgar cd94200d5f feat(libkernel_sys): describe the guest process through get_authinfo 2026-10-25 13:06:28 +02:00
Yossi Yadgar c2652b88ca feat(libkernel_sys): report a retail console from sceKernelIsCEX and sceKernelIsDevKit 2026-10-25 13:06:12 +02:00
ali zedan 2c5fcf6406 fix(kernel): safely copy guest path arguments 2026-10-25 08:28:09 +01:00
Dean 61fc572cee Merge pull request #10434 from Retr0G28/fix/linkat-directory-descriptor
fix(libkernel_sys): resolve linkat paths relative to a directory descriptor
2026-10-25 19:16:10 +13:00
slopgobblercobbler 9b4a3b3d81 feat(libkernel_sys): implement scePthreadMain through pthread_main_np 2026-10-25 02:28:39 +01:00
Dean cf528e78c6 Merge pull request #9160 from yabanana/feat/kernel-sys-thread-queries
feat(libkernel_sys): identify the initial pthread
2026-10-25 12:57:53 +13:00
hypermistandClaude Opus 5.5 3dd4e1fd18 Merge remote-tracking branch 'upstream/main' into fix/kernel-sys-firmware-constants
Clean merge.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 12:56:11 +13:00
Daniele Giovane 32926902b8 Merge main and leave pthread attributes to the earlier contribution 2026-10-24 22:38:29 +02:00
boykopovar fdf9ca7574 fix(sdk): reconcile public headers after rebase 2026-10-24 23:17:47 +03:00
boykopovar f38d29fd08 refactor(sdk): add canonical headers for remaining libraries 2026-10-24 23:17:42 +03:00
Retr0 2d32e8bd85 fix(libkernel_sys): check the linkat source before resolving the target 2026-10-24 16:00:43 +03:00
Dean 9a1ea5de1b Merge pull request #10110 from BunnyFl/feat/libkernel-version-trace-queries
feat(libkernel): implement the system-ex version, lower-limit and trace memory queries
2026-10-25 01:53:38 +13:00
Dean Galvin b0b291be0b Merge main into feat/libkernel-sys-underscore-openat 2026-10-24 21:42:59 +13:00
Dean e058b3284a Merge pull request #9167 from slider/feat/libkernel-named-semaphores
feat(libkernel): implement named POSIX semaphores
2026-10-24 21:09:30 +13:00
Dean dd04e33b38 Merge pull request #10363 from cadenasynyster/fix/windows-mkdirat-loop
fix(libkernel_sys): report ELOOP from mkdirat through a Windows symli…
2026-10-24 16:36:38 +13:00
Retr0 d44d5685eb fix(libkernel_sys): resolve linkat paths relative to a directory descriptor 2026-10-24 02:58:00 +03:00
Dean d8b73e3644 Merge pull request #9273 from DavidSamir/feat/libkernel-sys-pselect
feat(libkernel): implement pselect over select
2026-10-24 12:53:12 +13:00
Dean c675a415f2 Merge pull request #9103 from HQasper/claude/project-thread-w0s18y-chown
feat(libkernel_sys): implement chown, lchown, fchownat and linkat
2026-10-24 11:56:40 +13:00
Dean fac234a47c Merge pull request #9134 from orezraey/fix/libkernel-event-flag-measured-ps5
feat(libkernel): match event flags to PS5 and add shared flags
2026-10-24 09:12:14 +13:00
Dean a42f61d5b1 Merge pull request #10060 from xXPBSXx/carry/6525-fpathconf
feat(libkernel_sys): implement fpathconf and _fpathconf
2026-10-24 09:03:45 +13:00
cadenasynyster 0aef357591 fix(libkernel_sys): report ELOOP from mkdirat through a Windows symlink loop on a descriptor
On Windows, mkdirat with a directory descriptor and a relative path that goes through a symbolic link pointing to itself reported EIO. CreateDirectoryW fails with ERROR_CANT_RESOLVE_FILENAME for such a path, and the error mapping had no case for it, so it fell through to GuestEio. FreeBSD fails the lookup with ELOOP. The path form of mkdir and openat with the same descriptor already return ELOOP. ERROR_CANT_RESOLVE_FILENAME now gives ELOOP.

guest_kernel_sys gains a Windows check with a file-type and a directory-type self-loop: mkdirat through the loop returns ELOOP and mkdirat of the link itself still returns EEXIST. The check is skipped when the host denies symbolic link creation.
2026-10-23 21:17:33 +02:00
Dean 9fbcb97d5f Merge pull request #10073 from JJenkx/windows/link-symlink-loop
fix(libkernel_sys): report ELOOP from link through a Windows symbolic link loop
2026-10-24 03:24:38 +13:00
xXPBSXxandClaude Sonnet 5.5 01655d7219 fix(libkernel_sys): answer fpathconf for pipes and _PC_ASYNC_IO as FreeBSD does
kern_fpathconf answers _PC_ASYNC_IO with _POSIX_ASYNCHRONOUS_IO (200112) after the descriptor lookup, and a pipe or socket (no vnode) with PIPE_BUF for _PC_PIPE_BUF and EINVAL for every other name. Drop the unused File.hpp include and the duplicate KernelErrors.hpp include.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-23 13:44:46 +02:00
xXPBSXxandClaude Sonnet 5.5 4e7e4eed8f fix(libkernel_sys): check the fpathconf descriptor with fstat
DescriptorIsOpen_nid_no_patch is not extern "C", so the patched libkernel.prx
does not export it and libkernel_sys.prx fails to load (patched_libraries:
LoadLibraryEx error 127). Check the descriptor like fchown does: GuestFstat on
Windows, fstat elsewhere, EBADF on failure.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-23 13:44:45 +02:00
QuentinRemondandClaude Sonnet 5.5 07d3d6447a feat(libkernel_sys): implement fpathconf and _fpathconf
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-23 13:44:43 +02: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
Dean 58ceeb8ed5 Merge pull request #9040 from YossiYad/feat/kernel-sys-workaround-process-type
feat(libkernel_sys): implement sceKernelTitleWorkaroundIsEnabled and sceKernelGetProcessType
2026-10-24 00:33:16 +13:00