Commit Graph
14017 Commits
Author SHA1 Message Date
Dean 9ab27e5a4e Merge pull request #6599 from MarcZX100/codex/kqueue-elevated-token-privileges-6597
test(libkernel): drop backup privileges in denied parent watch
2026-10-18 00:32:40 +13:00
Dean df92748a30 Merge pull request #6318 from hypermoist/fix/libc-lgamma-signgam
fix(libc): store the sign of gamma in an exported signgam from lgamma
2026-10-18 00:32:04 +13:00
Dean 1846719e46 Merge pull request #6524 from javierUDP/test/macos-conversion-execution
test(relinker): execute the AMD64-only conversion stubs on macOS
2026-10-18 00:31:34 +13:00
Dean aa819ac74a Merge pull request #6956 from jradic/fix/libkernel-thread-local-slot-first-use
fix(libkernel): allocate the Windows thread-local slot on first use
2026-10-18 00:31:01 +13:00
Yunus Shaikh d25edc98f7 Merge main into fix/agc-sample-location-grid-fallback
main 1e4ec0e3f7 adds depthCopyFormatTests to the graphics tests' run
list right after UnwrittenSampleLocationTests, where this branch adds
sampleLocationGridFallbackTests. Run both, this branch's first.
2026-10-17 04:30:31 -07:00
Dean 677354d9da Merge pull request #7018 from thuanquang/fix/mul-lo-u16-24-bit-factors
fix(shader): read low-half 16-bit multiply factors as 24-bit fields
2026-10-18 00:30:09 +13:00
Dean ab85981811 Merge pull request #6251 from parthbhanti22/fix-fchmodat-symlink
fix(libkernel_sys): return 0 for AT_SYMLINK_NOFOLLOW in fchmodat
2026-10-18 00:29:29 +13:00
Dean 1e4ec0e3f7 Merge pull request #6415 from GitamarT045T3R/fix/shader-cache-test-windows
test(agc): delete mapped shader cache entries with POSIX semantics on Windows
2026-10-18 00:28:40 +13:00
XairRrR a9377e34ba feat(pad): touch the left or right touchpad half from the input command file
APS5_PAD_INPUT_FILE commands can set bit 0x200000 or 0x400000 to put a
finger on the left or right half of the touchpad, as the TouchLeft and
TouchRight keys do, so scripted runs can press touchpad combinations.
tools/pad_input.py queues them as touch-left and touch-right.

AI-assisted: yes
2026-10-17 13:27:54 +02:00
Dean 46ba2b91bc Merge pull request #6700 from xXPBSXx/test-agc-depth-copy-format
test(agc): cover the color to depth format mapping of depth compare copies
2026-10-18 00:27:51 +13:00
Dean d0a6396acb Merge pull request #6155 from Dextroid17/fix/agc-recorder-test-stamp-writes
test(agc): stamp the guest writes the recorder tests make behind the driver's back
2026-10-18 00:27:12 +13:00
lorkydey 14acf7f444 feat(libc): implement bounded error message APIs 2026-10-17 13:26:23 +02:00
Dean 984e5d7201 Merge pull request #7069 from akkadbakkad89/fix/intel-single-queue-tests
test(agc): cover Intel single-queue devices in recorder fixtures
2026-10-18 00:25:03 +13:00
Dean d0270a11be Merge pull request #7058 from seradavid/fix/agc-emulated-color-compare-lod-clamp
test(agc): skip the emulated color compare clamp cases without MinLod
2026-10-18 00:24:41 +13:00
Dean 4146636d58 Merge pull request #7033 from milescoviello/fix/sce-mprotect-zero-length
fix(libkernel): return 0 from sceKernelMprotect and sceKernelMtypeprotect for a zero length
2026-10-18 00:24:06 +13:00
Dean 12a71f3f59 Merge pull request #7032 from milescoviello/fix/getitimer-cpu-timers-zero
fix(libkernel): read ITIMER_VIRTUAL and ITIMER_PROF as disarmed in getitimer
2026-10-18 00:23:45 +13:00
Dean df377440aa Merge pull request #7027 from milescoviello/fix/rw-count-einval
fix(libkernel): return EINVAL from read and write for a byte count above SSIZE_MAX
2026-10-18 00:23:29 +13:00
Dean a08bdcb309 Merge pull request #7026 from milescoviello/fix/pthread-attr-stack-einval
fix(libkernel): return EINVAL from the scePthreadAttr stack and guard size calls
2026-10-18 00:23:13 +13:00
Dean de056cf06d Merge pull request #7025 from milescoviello/fix/kernel-read-write-null
fix(libkernel): return EFAULT from sceKernelRead and sceKernelWrite for a null buffer
2026-10-18 00:22:57 +13:00
Dean 8c924f12c8 Merge pull request #7024 from milescoviello/fix/fstat-null-efault
fix(libkernel): return EFAULT from fstat for a null stat buffer
2026-10-18 00:22:34 +13:00
Dean 3f57cd430f Merge pull request #7023 from milescoviello/fix/getrusage-errors
fix(libkernel): return EINVAL and EFAULT from getrusage instead of throwing
2026-10-18 00:22:20 +13:00
emirplus 9c6efd3771 fix(tools): recognize indented skip reasons in check_skips list 2026-10-17 14:21:14 +03:00
milescovielloandClaude Opus 5.5 91fbafd94a fix(libkernel): keep refusing a read low-water mark above 1 on non-stream sockets
On Linux, FIONREAD on a datagram socket reports the next datagram only,
where FreeBSD's sbavail counts every queued byte, so a read mark above 1
there could never fire. kevent now throws for it as before; stream
sockets and marks of 1 are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 11:20:03 +00:00
emirplus 1783de553b fix(tools): handle trailing separators in select_tests root paths 2026-10-17 14:17:42 +03:00
inmert 91fdcbdf1a ci: run the relinker TLS coverage tests under AddressSanitizer
The segment-prefix-at-eof case from #6401 only catches the 1-byte read
past the input when the relinker is built with AddressSanitizer, and no
CI job did that. The new job builds the relinker alone in Debug with
ANYPS5_ENABLE_ASAN and runs the tls_function_coverage tests. It has to
be Debug: at -O3 GCC no longer emits the stray load, so a Release ASan
build passes with the fix reverted.
2026-10-17 16:47:29 +05:30
Aryan SharmaandClaude Haiku 5.5 6a8062b487 feat(libSceNpTrophy2): declare sceNpTrophy2GetRewardIcon's arguments
The bundled PSNCore.prx of PPSA06888 calls sceNpTrophy2GetRewardIcon
with (context, handle, reward_id, buffer, size): once with a null buffer
to read the size, then with a buffer of that size. The function still
throws because the reward icon data is unknown.

Co-Authored-By: Claude Haiku 5.5 <[email protected]>
2026-10-17 16:45:41 +05:30
thuanquangandClaude Opus 5.5 e5b4b326ca test(agc): accept any NaN where the f16 fma and fma_mix tests expect one
agc_driver_f16_fma_denormal_modes and
agc_driver_fma_mix_f16_denormal_modes compared NaN results (inf * 0)
bit for bit with the RX 6700 XT's, but the NaN bits of f16 arithmetic
and of v_fma_mix_f32 with f16 sources are left to the driver, so the
tests fail on NVIDIA (0x7fff for 0xfe00). Rows whose expected value is
a NaN now accept any NaN; every other row is still exact.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 18:13:41 +07:00
Dean 20a84154ff Merge pull request #6882 from Ondra97/codex/fix-buffer-slab-failure-cleanup
fix(agc): release buffer slabs when metadata allocation fails
2026-10-18 00:10:12 +13:00
Yunus Shaikh f063282659 test(agc): order draws reading through the BDA table against buffer descriptor stores
A draw that only reads through the table now leaves its pass open to
the next draw, so its ordering against guest memory written through a
buffer descriptor rests on the pass hazard tracker's unknown-read rule
alone. Two cases cover it in agc_driver_address_passes: a draw that
reads through the table what the previous draw stored through a buffer
descriptor begins its own pass and sees the store, and a draw storing
through a buffer descriptor after one that read through the table
begins its own pass. Both fail when the tracker drops that rule.
2026-10-17 11:07:21 +00:00
Yunus Shaikh 4ff3b05451 fix(agc): count every physical pointer write form in the BDA store scan
The scan listed stores, memory copies and atomics, and took only typed
OpTypePointer declarations as physical pointer types. A module that
wrote guest memory through an untyped PhysicalStorageBuffer pointer
(SPV_KHR_untyped_pointers), through a GLSL.std.450 Modf or Frexp output
pointer, or with a cooperative matrix store would have been taken for
one that only reads through the BDA table, and its draws would have
continued a render pass they must end. The recompiler emits none of
these today, so no module's answer changes.

Untyped physical pointer types now count as physical pointer types, an
extended instruction with a physical pointer operand counts as a store,
and the cooperative matrix stores store through their pointer operand.
Pointer type declarations no longer add their storage class to the
pointer values.

The tests build modules for every write form the scan knows, the reads
it must not take for writes, and the three forms above.
2026-10-17 11:05:41 +00:00
Claude 91d8416fdd fix(ssl): compile out the Mbed TLS self-test counters
With MBEDTLS_SELF_TEST, ecp.c counts point additions, doublings and
field multiplications in unsynchronized globals. Handshakes on separate
connections run in parallel, each under its own session lock, so the
counters race; ThreadSanitizer reports it on the parallel transport
test. Nothing calls the self-test functions.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RoU3ZF76A6uR8sCA7NMLch
2026-10-17 11:00:59 +00:00
Claude 9766ea7781 Merge upstream/main into claude/brave-ride-lz92qi
Brings in main's connection verify options, minimum version, ALPN and
certificate readers. The conflicts in libSceSsl/Export.cpp and the
libSceSsl debt entry take the resolution from blawesom's rebase of this
pull request (blawesom/AnyPS5 rebase/6828 at 925c37aa0): SslConnection
keeps main's verifyOptions, minimumVersion and alpn next to the session,
and the debt entries follow main's structure.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RoU3ZF76A6uR8sCA7NMLch
2026-10-17 11:00:59 +00:00
milescovielloandClaude Opus 5.5 e1d4ccba49 fix(libkernel): take NOTE_LOWAT on socket read and write events
kevent threw for NOTE_LOWAT. On a socket's EVFILT_READ it now sets the
low-water mark as FreeBSD 11's filt_soread does: the event fires once the
buffered bytes reach it, or at end of file or on a listening socket, and
a later change of the knote replaces it. EVFILT_WRITE takes a mark of 1,
where the host's writability stands in for a free byte; other write marks
and marks below 1 still throw. A pipe ignores the mark, as filt_piperead
does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 10:58:41 +00:00
milescovielloandClaude Opus 5.5 e71ade0ac3 fix(libSceSystemService): run the shutdown callbacks after LoadExec starts the exit
Since #5978, StartExit only parks the other guest threads and exit runs
LibcRunShutdown itself, so LoadExec's three exits (the converted
executable on Windows and Linux, and the host executable) now call
LibcStartExit and then LibcRunShutdown, as exit does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 10:50:52 +00:00
battleblob1andClaude Opus 5.5 c2f466de53 docs(libSceVideoOut): list the disabled Windows.Gaming.Input backend in technical debt
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 13:50:42 +03:00
milescovielloandClaude Opus 5.5 5b072bc2c4 fix(libSceSystemService): park guest threads during LoadExec's shutdown as exit does
Metal Gear Solid 4 (PPSA18194) aborts on main when its launcher starts
the game: sceSystemServiceLoadExec runs the guest shutdown, a render
thread that then calls into the stopped AGC driver gets ProcessShutdown
back from LibcAwaitExit, and the exception unwinds into title code,
which terminates the process before the new executable starts.

LibcAwaitExit parks a thread only once an exit has been requested, and
LoadExec ran the shutdown without requesting one. It now starts the
shutdown the way exit does, so such threads wait until the process is
replaced.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 10:50:36 +00:00
Adrià 864729dc0d Merge pull request #6105 from Zinebyte/fix/macos-guest-weak-imports
fix(relinker): preserve weak imports in macOS guest modules
2026-10-17 12:44:41 +02:00
pushkarreddyy 9fb282064b fix(libSceAgcDriver): accept unclamped normalized color target formats 2026-10-17 16:12:00 +05:30
Aryan Sharma baf107a58c fix(pad): clear and expire latched presses, and keep L2/R2 analog with their bits
A latched press is cleared when the pad is initialized and when the title reads through
scePadRead, and is dropped if the title does not read it within 100 ms, so an old press
cannot show up later as a fresh press. A latched L2 or R2 press also carries the analog
value it was published with, so the button bit and the analog value agree.
2026-10-17 16:08:10 +05:30
Aryan Sharma 5786a96283 fix(pad): report a press that ends before the next pad read
scePadReadState only returned the latest input, so a tap that began and ended between two reads was never reported. Latch the pressed buttons when input is published and fold them into the next ReadState.
2026-10-17 16:08:10 +05:30
Jan ŠléglandClaude Fable 5.1 39c23664bd fix(agc): let the storage image cache budget follow the heap's use like the sampled one
StorageTextureBudget gave the storage image cache a quarter of the VK_EXT_memory_budget
budget of the largest device-local heap (capped at TextureCacheBudget, never below 512 MiB)
whatever else the heap held, while SampledTextureBudget takes what that budget leaves after
the heap's other use. On a 10 GB card the storage cache kept 2024-2170 MiB into a level load
whose depth and render target allocations then failed with VK_ERROR_OUT_OF_DEVICE_MEMORY
with the heap at its reported budget where a run logged it.

The storage image budget is now what the reported budget leaves after the heap's use other
than the cached storage images, the unused part of the sampled textures' 2 GiB floor and an
eighth of the budget; the caps at a quarter of the budget and at TextureCacheBudget and the
512 MiB floor stay. The sampled budget still reserves TextureCacheBudget for the storage
cache, at least the storage cap, and the storage budget reserves the sampled textures alive,
so neither counts bytes the other may take; while the sampled textures alive stay within
their floor the sampled budget falls first, then the storage budget, and above it both fall
together. The budget line also prints when the storage image budget moves by more than a
tenth, with its previous value, and StorageTextureCacheBudget is exported for the execution
test.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-10-17 12:33:05 +02:00
Ondra97 a963820ce4 test(agc): isolate host import failure fixture sources 2026-10-17 12:29:13 +02:00
Alexej Szpevák 31cd0e2604 test(libkernel): check socket write event space shrinks and recovers
On a Unix stream socketpair the write event's data drops by at least the bytes sent while the peer has not read them, and comes back to the idle value once the peer drains them. Off Linux the test only checks that the value stays positive and never grows.
2026-10-17 12:28:11 +02:00
Alexej Szpevák f2d3980f5e fix(libkernel): report free send space for socket write events on Linux
A socket's EVFILT_WRITE and sceKernelAddWriteEvent reported the whole SO_SNDBUF in data, however much was already queued. FreeBSD 11.4's filt_sowrite reports sbspace, the space still free. On Linux the queued bytes from SIOCOUTQ are now taken off SO_SNDBUF. Windows has no query for the queued bytes and macOS is not wired up, so both keep reporting SO_SNDBUF; the debt entry says so.
2026-10-17 12:28:11 +02:00
Ondra97 c5bd6c7b38 fix(agc): reuse import allocation status during cleanup 2026-10-17 12:21:55 +02:00
Adrià 673f7406c5 Merge pull request #6103 from Zinebyte/fix/sem-timedwait-cancellation
fix(libkernel): cancel before acquiring a ready timed semaphore
2026-10-17 12:15:32 +02:00
mrfelekandClaude Opus 5.5 40f4506659 fix(libSceNgs2): let render skip a grain while another thread holds the system lock
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01BywPXoZACVi8ALV4JKvuPZ
2026-10-17 12:15:01 +02:00
Ondra97 89bd3f19b6 fix(agc): publish host import handles only after creation succeeds 2026-10-17 12:14:15 +02:00
Alexej Szpevák 9ece094515 test(libkernel): cover F_GETLK against another process's record locks
The fcntl tests only ever held locks in the guest's own process, where FreeBSD's lf_blocks never reports a conflict, so the host lock path that answers F_GETLK was not exercised. A forked process now holds a read lock, a write lock and a write lock to the end of the file through the host. F_GETLK with F_UNLCK reports only the write locks, F_RDLCK the same and F_WRLCK the read lock, each with the owner's pid and SEEK_SET; F_SETLK over the read lock fails with EAGAIN, and nothing is reported once the owner exits.
2026-10-17 12:13:54 +02:00
Dean ca82d7d882 Merge pull request #6180 from MarcZX100/codex/fix-pixel-lane63-proof-budget-5398
fix(shader): budget pixel lane proof for NHL 26 replay
2026-10-17 23:07:55 +13:00