Commit Graph
1 Commits
Author SHA1 Message Date
aasishdairel aa04cdc4c3 fix(libkernel): copy batch map entries through guest copies
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.
2026-11-17 00:54:42 +05:30