Files
ppsspp/Core/HLE
Henrik Rydgård 41144e3b35 Give the memory partitions the caller's privilege, not the syscall's
PPSSPP decided whether a caller was privileged with hleIsKernelMode(), which reports whether the
syscall being executed is itself a kernel-only export. That's a different question from the one
the hardware answers: on a PSP the privilege belongs to the calling module, and a kernel module
reaches sceKernelCreateTlspl through the ordinary ThreadManForUser NID like anything else. So a
kernel module asking for partition 1, 3 or 4 got ILLEGAL_PERM where a real PSP hands it over,
which the new threads/tls/kernel/partition test shows directly.

BlockAllocatorFromID now also accepts a caller whose thread belongs to a kernel module, via a new
__KernelCurThreadIsKernelMode(). It checks the thread's own attribute first and then the owning
module, because a kernel module's main thread isn't necessarily flagged kernel - the attribute
comes from PSP_MAIN_THREAD_ATTR, which needn't set it. That mirrors how sceKernelCreateThread
already works out allowKernel.

This only ever widens access, and only for threads belonging to kernel modules, so games are
unaffected - they run in user modules and see exactly what they saw before.
2026-09-08 15:18:02 -06:00
..
2025-07-22 17:48:20 +02:00
2025-07-22 17:48:20 +02:00
2025-07-22 17:48:20 +02:00
2026-08-11 10:28:36 +02:00
2025-08-06 17:44:54 +02:00
2026-01-18 23:40:13 +02:00
2026-08-11 09:08:52 +02:00
2025-07-20 19:30:35 +02:00
2026-08-11 20:12:10 +02:00
2025-07-20 19:32:05 +02:00
2025-02-14 09:50:55 -06:00
2026-08-11 20:14:01 +02:00
2026-08-11 10:28:36 +02:00
2026-08-11 10:28:47 +02:00
2025-01-05 19:14:15 +01:00
2026-08-11 10:28:47 +02:00
2026-08-24 09:30:44 +02:00
2025-04-03 14:13:50 +02:00
2026-08-11 20:14:01 +02:00
2026-08-12 14:02:19 +02:00
2025-02-04 11:53:22 -06:00
2026-08-08 18:18:28 +02:00