Commit Graph
20967 Commits
Author SHA1 Message Date
GruzzberryandClaude Sonnet 5.5 4d8fa35a5e fix(libkernel): fail sysctl and sysctlbyname with EFAULT on an unreadable or unwritable pointer
FreeBSD 11.4's sys___sysctl and userland_sysctl copy the name and the
old length in, and copy the value and the length out, so a bad pointer
gives EFAULT in that order. sysctl dereferenced them directly, and
sysctlbyname read its name with strcmp.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-27 08:30:17 +01:00
Adrià 8df2c3ed0e Merge pull request #11259 from orezraey/docs/libc-reallocalign-measured-ps5
docs(libc): record reallocalign to size 0 as measured on a PS5
2026-10-27 08:29:28 +01:00
Adrià 57e44c4b3d Merge pull request #11257 from orezraey/docs/libkernel-accept-option-inheritance-measured-ps5
docs(libkernel): record the socket options an accepted socket inherits as measured on a PS5
2026-10-27 08:28:31 +01:00
Adrià edabe9efa1 Merge pull request #11255 from Michael-KD/docs/vcc-descriptor-tuples-measured
docs(shader): record the VCC descriptor tuples measured on RDNA2
2026-10-27 08:28:15 +01:00
Adrià 42317c7f32 Merge pull request #11256 from Michael-KD/docs/array-comparison-through-2d-measured
docs(shader): record 2D-array comparison samples measured on RDNA2
2026-10-27 08:27:36 +01:00
Adrià 5c356f41c3 Merge pull request #11048 from imellag/feat/libkernel-macos-main-thread
feat(libkernel): start the guest off the main thread on macOS
2026-10-27 08:27:20 +01:00
Adrià b9a946180a Merge pull request #11046 from simnJS/claude/sweet-faraday-oqfsm5
feat(libSceUsbStorage): pass the host's USB FAT and exFAT volumes through
2026-10-27 08:27:14 +01:00
Adrià a0aafc1dba Merge pull request #11253 from orezraey/docs/libkernel-module-process-info-measured-ps5
docs(libkernel): record the text location, unwind info, SoC id and model queries as measured on a PS5
2026-10-27 08:26:53 +01:00
Adrià 8787ae1bb3 Merge pull request #11245 from AlexFigas/docs/libc-isfinitel-bundled-code
docs(debt): close the __isfinitel entry with the bundled libc.prx code
2026-10-27 08:23:28 +01:00
Adrià FranchandClaude Sonnet 5.5 9e66ff6b20 test(relinker): drop the RELATIVE fixup from the strict dynamic segment fixture
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-27 08:19:05 +01:00
roboterspinne 0326845257 docs(relinker): record measured dyld behaviour for macOS fixups
The debt entry on pointer fixups in executable segments claimed that
dyld refuses them, which no run had shown. It now states what was
measured on an M1 Pro running macOS 27.0.1 under Rosetta 2: dyld_info
reports both cases, the PF_R|PF_W|PF_X case loads and runs, and a
fixup into a PF_R|PF_X segment ends with SIGBUS in dyld. The
interpreter_in_code fixture keeps a read-only data PT_LOAD for the
Windows runs, so PE output still covers a RELATIVE into it.
2026-10-27 08:18:50 +01:00
roboterspinne e5297264e3 fix(relinker): reject macOS fixups outside writable segments
The macOS image writer emitted dyld rebase and bind opcodes for any
target inside a segment, so an R_X86_64_RELATIVE into an R-X PT_LOAD
became a rebase into a read-execute segment. dyld-1378 refuses fixups
in segments without write access (enforceFixupsInWritableSegments), so
Locate now throws when the target segment lacks VM_PROT_WRITE. Such
inputs now fail the macOS conversion instead of writing an output that
dyld would not load.
2026-10-27 08:18:50 +01: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
Emanuele 896ae02ab5 fix(libkernel): address the macOS stack protection review 2026-10-27 08:16:36 +01:00
Emanuele 62d80b578f fix(libkernel): protect guest stack pages through the write watch on macOS 2026-10-27 08:16:36 +01:00
Emanuele f7f88a4886 fix(libkernel): wire a remapped locked range again on macOS
- mlock on macOS skipped every page the locked ranges recorded, but a
  mapping that replaces a locked range in place leaves the record behind
  without wires, so a later mlock returned 0 and wired nothing. Within a
  recorded range it now wires again the host regions whose wire count is
  0. The mlock test locks, remaps the range fixed and locks again.
- munlock and munlockall on macOS hold the locked-range lock across the
  host unwire and the record update, so a concurrent mlock cannot see a
  range as wired while it is being unwired.
- sceKernelVirtualQuery limits the host region it reports to the write
  watch run that holds the address, so the permissions it reports hold
  for the whole extent.
- The libc debt entry says what the mapping paths do: they register the
  range again, and GuestWriteWatchProtectionChanged has no caller yet.
2026-10-27 08:16:36 +01:00
Emanuele f2e8d5a3eb fix(libkernel): address the macOS memory protection review
- mlock on macOS wires only the pages libkernel has not wired yet. XNU
  counts each wire of a page, and the locked ranges merge overlapping
  locks, so a page locked twice stayed wired after munlock and
  munlockall. The mlock test checks the wire count on macOS.
- mprotect changes a watched page through GuestWriteWatchProtect, which
  applies the host protection and records it under the write watch's
  lock, so a collection on another thread cannot run between the two.
  The write watch test covers it.
- sceKernelVirtualQuery takes a watched page's write permission from the
  write watch for memory outside the guest allocation registry.
- GuestAllocationsGuestPages counts an image segment up to the end of
  its last host page, as the image page collection does.
- The macOS includes stay in main's include block, so the host code
  other pull requests add there still sees them; the unused Mach-O
  headers and the end trim, which never changed the protected spans,
  are gone, and the guest page size is passed in.
- The libc and libkernel debt entries describe what is wired now.
2026-10-27 08:16:36 +01:00
Emanuele 16feb3387f test(libkernel): keep the main stack checks of the stack protect test on Linux
The previous commit ran the main stack checks on macOS through
_NSGetExecutablePath, but on macOS every child skips them: the stack is
mapped within 1 MiB of its bottom and its limit cannot be raised. They
are now built and run on Linux only, as in mugurc's macOS series, and
other hosts run the thread stack check alone.
2026-10-27 08:16:36 +01:00
Emanuele 149ca06f15 test(libkernel): run the main stack checks of the stack protect test on macOS
The main stack checks run the test again in a child through
/proc/self/exe, which macOS does not have, so the child exited with 127
and the check failed before testing anything. On macOS the child now
runs the path _NSGetExecutablePath reports.
2026-10-27 08:16:35 +01:00
Emanueleandmugurc 190ed6c8fb feat(libkernel): guest memory protection and VirtualQuery on macOS hosts
- mprotect: the guest rounds a range to its 16 KiB pages. A Mach-O image
  is loaded at a multiple of the host page size only (4 KiB under
  Rosetta), so the pages are counted from where the ELF address 0 of the
  image holding the range was loaded, and a rounded edge smaller than a
  guest page that lies in the gap between two segments, where no host page
  exists, is left out. The write watch is told the new protection.
- sceKernelVirtualQuery reads the region with mach_vm_region.
- sceKernelMunlockall unlocks the ranges libkernel locked, one by one:
  macOS has no munlockall, which fails there with ENOSYS and would
  overwrite errno.
- The stack protect test reads page protections with mach_vm_region.

This is mugurc's f66a4df741 from his macOS series, without the mlock
check that #10889 adds.

Co-authored-by: mugurc <[email protected]>
2026-10-27 08:16:35 +01:00
milescovielloandClaude Opus 5.5 acd5ee3ff5 docs(libSceGameLiveStreaming): note the status fields three titles read
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 07:09:42 +00:00
xXPBSXx 9dc6ed12c2 Merge main (81267b2204) into libm/sinh-msun 2026-10-27 08:09:31 +01:00
Daniel Castrillon bfe961a3ae Merge remote-tracking branch 'origin/main' into fix/runtime-formatted-store-expansion 2026-10-27 02:09:04 -05:00
milescovielloandClaude Opus 5.5 3e1dfe558f docs(libSceSigninDialog): note the result size and field three titles use
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 07:08:04 +00:00
Dean 81267b2204 Merge pull request #8725 from orezraey/fix/libkernel-sync-on-address-measured-ps5
fix(libkernel): follow sceKernelSyncOnAddressWait and Wake as measured on a PS5
2026-10-27 20:03:20 +13:00
Adrià eadb951c9d Merge pull request #11209 from voidlakhan/fix/np-universal-data-system-null-argument
docs(libSceNpUniversalDataSystem): record unverified null argument behavior
2026-10-27 08:02:56 +01:00
Dean 6af5e2de7f Merge pull request #10563 from bipinkrish/feat/opus-encoder-libraries
feat(core): implement the Opus encoder libraries
2026-10-27 20:02:48 +13:00
Daniel Castrillon 07a0189e0f test(shader): compare runtime formatted stores with constant formats 2026-10-27 02:01:55 -05: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
Adrià f1adec7eb1 Merge pull request #11230 from orezraey/docs/libkernel-sync-timeouts-eventflag-measured-ps5
docs(libkernel): record timed self-locks, event flag open and create, and the reltimed calls as measured on a PS5
2026-10-27 08:00:27 +01:00
xXPBSXxandClaude Sonnet 5.5 a7685595cd test(libc): check the errno sinh sets on overflow
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-27 08:00:05 +01:00
xXPBSXxandClaude Sonnet 5.5 a695743b3d fix(libc): set ERANGE when sinh overflows
The host sinh set errno to ERANGE on overflow and sinhf does, but the msun port
returned the overflowed value with errno untouched. The overflow path of
sinh_nid_postfix sets ERANGE again; msun itself sets no errno.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-27 07:59:34 +01:00
Adrià 76dec1794b Merge pull request #8998 from MarcZX10/codex/f32-image-store-rtz-8282
fix(agc): round 16-bit float image stores toward zero
2026-10-27 07:59:23 +01:00
Adrià b241428c63 Merge pull request #10984 from EagleBearerYS/fix/count-throwing-done-exports
fix(prx): report four exports that always throw as not implemented
2026-10-27 07:59:18 +01:00
Adrià bf83eae375 Merge pull request #10947 from roboterspinne/fix/relinker-windows-tls-template-imports
fix(relinker): reject Windows executable imports bound into the TLS template
2026-10-27 07:59:13 +01:00
Adrià 7f289b53df Merge pull request #10946 from roboterspinne/fix/relinker-macos-tls-export-at-block-end
fix(relinker): accept a zero-size TLS export at the end of the macOS TLS block
2026-10-27 07:59:08 +01:00
Adrià 63d5eb00e4 Merge pull request #10892 from EagleBearerYS/feat/scefont-glyph-render-image-v2
feat(libSceFont): render generated glyphs with sceFontGlyphRenderImage
2026-10-27 07:59:02 +01:00
Adrià 589799aa53 Merge pull request #10889 from krishalivaibhav/fix/macos-mlock-prot-none
fix(libkernel): refuse mlock on PROT_NONE ranges on macOS
2026-10-27 07:58:57 +01:00
Adrià 8730eda992 Merge pull request #10876 from krishalivaibhav/fix/macos-process-parameters-macho
fix(macos): read application process parameters from Mach-O images
2026-10-27 07:58:53 +01:00
Adrià b806f1a7a0 Merge pull request #11217 from AlexFigas/docs/libc-dinkumware-division-evidence
docs(debt): cut the long-double Dinkumware entry to _LLog with the bundled libc.prx code
2026-10-27 07:58:44 +01:00
xXPBSXx fccdc6d687 Merge main (951e5963a4) into libm/sinh-msun 2026-10-27 07:58:16 +01:00
MarcZX10 280afbe043 docs(libSceGnmDriverForNeoMode): say that sceGnmRegisterOwner returns Failure instead of throwing 2026-10-27 06:57:40 +00:00
MarcZX10 37b863a3be test(libSceGnmDriverForNeoMode): check sceGnmRegisterOwner outside the no-argument table
The table's Query type takes no arguments, which stopped converting once sceGnmRegisterOwner got its (void*, const char*) prototype. The call is checked on its own against Failure instead.
2026-10-27 06:57:40 +00:00
MarcZX10 4f8c6c7be9 fix(libSceGnmDriverForNeoMode): give the three 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 06:57:21 +00:00
MarcZX10 1725aef9dc docs(libSceGnmDriverForNeoMode): record the single-source shadPS4 signatures of the declared stubs 2026-10-27 06:57:21 +00:00
MarcZX10 c2999115ab feat(libSceGnmDriverForNeoMode): declare 3 stubs with shadPS4 signatures
They still throw through NotImplemented_nid_no_patch; only the parameter
lists change. The only source is shadPS4's PS4 prototypes; nothing is measured on a PS5.
2026-10-27 06:57:21 +00:00
xdCloudy 1e1d2368d0 docs: distinguish known exports from unverified ABI 2026-10-27 19:57:19 +13:00
Dean Galvin 9c0445daae fix(libSceNpCommon): declare the salvaged exports in the public API 2026-10-27 19:57:19 +13:00
xdCloudy 11caf62300 fix(libSceCommonDialog): register pending NIDs 2026-10-27 19:57:19 +13:00
Dean Galvin e78f746c20 fix(libSceIcu): drop the two exports main already has 2026-10-27 19:57:19 +13:00