Commit Graph
244 Commits
Author SHA1 Message Date
Dean 93909fb801 Merge pull request #10695 from MarcZX10/marc/signatures-libkernel-sys
feat(libkernel_sys): declare eight Discovery stubs with the OpenOrbis signatures
2026-10-29 07:27:07 +13:00
Dean 1847b0bd00 Merge pull request #11754 from iAbdulrrahman/feat/libkernel-sys-console-identity
feat(libkernel_sys): implement genuine console and platform identity queries
2026-10-29 07:23:11 +13:00
Dean 750cf6cf48 Merge pull request #11595 from alvaroelpob/fix/libkernel-sys-linkat-symlink-itself
fix(libkernel_sys): link a symbolic link itself in linkat without AT_SYMLINK_FOLLOW
2026-10-29 01:32:29 +13:00
Dean d580b1f552 Merge pull request #11441 from p3n1cillin/claude/kernel-cpumode-game
feat(libkernel_sys): implement sceKernelGetCpumodeGame and sceKernelSetCpumodeGame as measured on a PS5
2026-10-29 01:32:11 +13:00
Adrià 241649ed7e Merge pull request #11296 from tablefrogpillow/fix/fpathconf-kqueue-shm-eopnotsupp
fix(libkernel_sys): fail fpathconf on a kqueue or shm descriptor with EOPNOTSUPP
2026-10-28 09:41:16 +01:00
Adrià d7fd416992 Merge pull request #11231 from Gruzzberry/feat/kldsym
feat(libkernel_sys): implement kldsym argument checks
2026-10-28 08:56:23 +01:00
AdriàandClaude Sonnet 5.5 f87b6289ac fix(libkernel): export the kqueue descriptor check to libkernel_sys
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-28 08:43:15 +01:00
tablefrogpillowandClaude Opus 4.8 d8dfb7eab4 fix(libkernel_sys): fail fpathconf on a kqueue or shm descriptor with EOPNOTSUPP
_fpathconf_nid_postfix only treated FIFOs and sockets as descriptors without
a vnode, so a kqueue or shm_open descriptor fell through to the UFS constants
(LINK_MAX 32767, NAME_MAX 255, PIPE_BUF 512). FreeBSD 11.4 kern_fpathconf
(kern_descrip.c:1411-1429) answers _PC_ASYNC_IO for every descriptor and
returns EOPNOTSUPP for a no-vnode descriptor that is not a pipe or socket.
Return EOPNOTSUPP for kqueue and shared-memory descriptors.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-10-28 08:43:15 +01:00
GruzzberryandClaude Sonnet 5.5 762a280ee3 feat(libkernel_sys): implement kenv
Follow FreeBSD 11.4 sys_kenv: KENV_GET, KENV_SET, KENV_UNSET and KENV_DUMP over
an in-memory kernel environment of at most 512 variables, with the 128-byte
name and value limits, ENOENT, EINVAL, ENAMETOOLONG and EFAULT.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-28 07:50:01 +01:00
Dean ba8845d2e7 Merge pull request #9442 from Gruzzberry/feat/lchflags
feat(libkernel_sys): implement lchflags
2026-10-28 13:00:19 +13:00
Adrià eece5da035 Merge pull request #10838 from EagleBearerYS/feat/libkernel-sys-finish-calls-v2
feat(libkernel_sys): finish sched_setscheduler and sigreturn
2026-10-27 13:20:31 +01:00
MarcZX10 731bf07eb1 fix(libkernel_sys): give the eight Discovery stubs their signatures in the public header
main declares them with empty parameter lists in Api.hpp, which conflict with the definitions.
2026-10-27 08:24:25 +00:00
MarcZX10 6b7ea3acd5 feat(libkernel_sys): declare eight Discovery stubs with the OpenOrbis signatures
They still throw through NotImplemented_nid_no_patch; only the parameter
lists and, for sceKernelLwfsLseek and sceKernelLwfsWrite, the 64-bit return
type change. The only source is the PS4 OpenOrbis libkernel.h.
2026-10-27 08:24:24 +00:00
Adrià 13926067ac Merge pull request #11026 from Gruzzberry/feat/profil
feat(libkernel_sys): implement profil argument checks
2026-10-27 08:18:36 +01:00
GruzzberryandClaude Sonnet 5.5 6b6ec00fad feat(libkernel_sys): implement kldsym argument checks
Follow FreeBSD 11.4's sys_kldsym: EFAULT for an unreadable lookup
structure, EINVAL for a wrong version or command, EFAULT or
ENAMETOOLONG for the symbol name, ENOENT for a negative file id. Any
other lookup throws, as no kernel module is modelled. Adds
GuestCopyIn_nid_no_patch for the checked structure read.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-27 08:01:39 +01:00
iAbdulrrahman c8b4b292a9 feat(libkernel_sys): implement genuine console and platform identity queries 2026-10-27 09:55:24 +03:00
Adrià FranchandClaude Sonnet 5.5 511735840c fix(libkernel_sys): keep the owner check of chown, lchown and fchownat as on main
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-27 06:14:13 +01:00
Yunus Shaikh 8f007d234a feat(libkernel_sys): implement sigreturn
sigreturn applies FreeBSD 11's amd64 sys_sigreturn checks:
- EFAULT for a null context;
- EINVAL for unknown mc_flags, and for rflags bits outside
  PSL_USERCHANGE that differ from the current flags;
- set_fpcontext's FPU format and ownership cases.
It then restores the context through the path setcontext uses, which
now lives in RestoreContext. A non-user %cs and an extended FPU state
still throw.
2026-10-27 06:14:13 +01:00
Yunus Shaikh 51849e7e41 feat(libkernel_sys): implement sched_setscheduler for the calling thread
FreeBSD 11's sys_sched_setscheduler checks: a null parameter is EFAULT,
another process is ESRCH and an unknown policy is EINVAL. Pid 0 sets the
calling thread through scePthreadSetschedparam. Values that call
rejects, and the guest's own pid, whose first thread is not tracked,
still throw.
2026-10-27 06:14:13 +01:00
Yunus Shaikh 788a87cb8e feat(libkernel_sys): fail chown, lchown and fchownat with EPERM for another owner
An owner or group other than the guest's (0) or the unchanged value
returns EPERM after the path lookup, as FreeBSD 11's chown(2) does for
a caller without the superuser privilege. That is the answer #8457
gives for fchown. A lookup error still comes first.
2026-10-27 06:14:13 +01:00
Adrià e3a2b3846d Merge pull request #10741 from camezaro-intc/feat/libkernel-sys-cpuset
feat(libkernel_sys): implement cpuset, cpuset_getid and cpuset_setid
2026-10-27 06:13:49 +01:00
Dean 1075c38f07 Merge pull request #10799 from EagleBearerYS/feat/libkernel-sys-ampr-command-writers
feat(libkernel_sys): write the AMM commands and wait for their completion
2026-10-27 15:00:11 +13:00
Dean 86a38cdf6c Merge pull request #9187 from slider/feat/libkernel-sched-params
feat(libkernel): implement sched_getparam, sched_getscheduler and sched_setparam for the calling thread
2026-10-27 14:57:32 +13:00
p3nicillinandClaude Opus 5.5 563844efe0 feat(libkernel_sys): implement sceKernelGetCpumodeGame and sceKernelSetCpumodeGame
ProsperoEden declares the setter with the mode as its argument and the
getter with an int output, and measured on a PS5 that modes 0 and 1 are
accepted, 2 to 7 return 0x80020016 and 1 is the default. Both threw as
discovered stubs. Other modes and a null output throw.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 00:44:24 +00:00
Dean Galvin f733f7dc43 Merge branch 'main' into feat/lchflags 2026-10-27 11:58:22 +13:00
Dean e6b0b00261 Merge pull request #11268 from camezaro-intc/feat/libkernel-sys-kld-queries
feat(libkernel_sys): implement kldfind, kldfirstmod, kldnext and kldunload
2026-10-27 11:06:13 +13:00
camezaro-intc 8723034d64 fix(libkernel_sys): address cpuset review feedback 2026-10-26 16:03:47 -06:00
Alvaro 13069d07ee fix(libkernel_sys): link a symbolic link itself in linkat without AT_SYMLINK_FOLLOW
linkat threw for a symbolic link as the source without
AT_SYMLINK_FOLLOW. FreeBSD 11.4's kern_linkat looks the source up with
NOFOLLOW in that case and links the symbolic link itself, also when it
dangles or names a directory, since the link is not a directory. On
Linux and macOS the host's linkat with flag 0 does the same, so the
source is linked there after the usual destination checks (EEXIST, then
ENOTDIR or ENOENT for the parent). Windows still throws.
2026-10-26 23:03:36 +01:00
Dean 45b71b5074 Merge pull request #11190 from zaryabzip/feat/system-flexible-memory
feat(libkernel): implement sceKernelMapNamedSystemFlexibleMemory
2026-10-27 11:02:21 +13:00
Dean ad1caa840c Merge pull request #10385 from alvaroelpob/feat/libkernel-pthread-setname
feat(libkernel): implement pthread_mutex_setname_np, pthread_rwlock_setname_np and pthread_barrier_setname_np
2026-10-27 10:54:00 +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 dd87687627 Merge pull request #10671 from pushkarreddyy/feat/libkernel-sys-kernel-queries
feat(libkernel): implement sysKernel update version and mode queries
2026-10-27 10:31:00 +13:00
Dean 5a2aa03726 Merge pull request #9195 from gazaret/feat/libkernel-sys-uuidgen
feat(libkernel_sys): implement uuidgen
2026-10-27 10:29:18 +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à 071552ef7f Merge pull request #10196 from orezraey/fix/libkernel-sys-pathconf-measured-ps5
fix(libkernel_sys): answer every pathconf name as the console's UFS mount does
2026-10-26 16:58:02 +01:00
Alvaro 20ead24d8b refactor(libkernel): declare the setname exports in the public header 2026-10-26 15:37:37 +01:00
Alvaro 5c30b97440 feat(libkernel): implement pthread_barrier_setname_np 2026-10-26 15:37:26 +01:00
Alvaro a27cecc950 feat(libkernel): implement pthread_rwlock_setname_np 2026-10-26 15:37:26 +01:00
Alvaro d100cdaf52 feat(libkernel): implement pthread_mutex_setname_np 2026-10-26 15:36:49 +01:00
Adrià 9656d366be Merge pull request #9962 from kallmek3nny/feat/libkernel-pthread-cond-setname-np
feat(libkernel): add pthread_cond_setname_np
2026-10-26 14:42:29 +01:00
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
zaryabzip b8ab1b1a5c feat(libkernel): implement sceKernelMapNamedSystemFlexibleMemory 2026-10-26 13:59:25 +05:00
camezaro-intc dcdd9c301e feat(libkernel_sys): implement cpuset, cpuset_getid and cpuset_setid 2026-10-26 00:19:31 -06:00
gazaret 5c73281606 fix(libkernel_sys): declare uuidgen in the public header
Replace the placeholder uuidgen_nid_postfix(void) declaration in
libkernel_sys/include/Api.hpp with the uuidgen(store, count) signature and
declare the GuestUuid layout there. Uuid.cpp and its test include the
public headers instead of declaring the functions and the type locally.
2026-10-26 11:10:39 +05:00
Nikolay Polukhin a05498c099 feat(libkernel_sys): implement uuidgen
Generate version 1 UUIDs as FreeBSD 11's kern_uuidgen does: consecutive
timestamps from the guest CLOCK_REALTIME, a 14-bit clock sequence that is
randomised on first use and incremented when the clock has not passed the
last batch, and a random multicast node. A count outside 1 to 2048 fails
with EINVAL and a null store with EFAULT.
2026-10-26 11:10:39 +05:00
camezaro-intc d4200caffc feat(libkernel_sys): implement kldfind, kldfirstmod, kldnext and kldunload 2026-10-25 23:58:13 -06: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