mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-12-04 16:40:32 +00:00
sceKernelBatchMap2 and sceKernelMemoryPoolBatch read each entry of the guest batch array through the guest pointer and passed &entry.start of that array into DoMapDirect and _mapFlexible, which read the hint and wrote the result pointer through the raw guest memory. An unreadable entries array or unwritable result slot faulted the host instead of returning an error. Each entry is now read with GuestCopyIn_nid_no_patch into a local, the map operations run against the local, and the start a map operation produced is stored back to the entry with GuestCopyOut_nid_no_patch. A copy failure returns SCE_KERNEL_ERROR_EFAULT and stops the batch; num_entries_out keeps reporting the number of entries whose operation ran and whose start was stored.
1.3 KiB
1.3 KiB
libkernel
add Functional
- sceKernelBatchMap and sceKernelBatchMap2 (libkernel) - each entry of the guest batch array is read with
GuestCopyIn_nid_no_patchinto a local before it is operated on, and the start a map operation (0 or 3) produced is stored back to the entry withGuestCopyOut_nid_no_patch, so an unreadable array or an unwritable entry start returnsSCE_KERNEL_ERROR_EFAULT(0x8002000e) instead of faulting the host. The count reported throughnum_entries_outstays the number of entries whose operation ran and whose start was stored; a copy failure stops the batch. The console's fault behaviour for an unreadable array or unwritable entry is unmeasured, so these are host-safety fallbacks that preserve callererrno. - sceKernelMemoryPoolBatch (libkernel) - each entry of the guest batch array is read with
GuestCopyIn_nid_no_patchinto a local before it is operated on, so an unreadable array returnsSCE_KERNEL_ERROR_EFAULT(0x8002000e) instead of faulting the host, with the processed count still reported throughnum_entries_outand the batch stopped at the failing entry. The console's fault behaviour for an unreadable array is unmeasured, so this is a host-safety fallback that preserves callererrno.