mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-16 23:17:29 +00:00
SPU: absolutely unacceptable hack for SPU LS
Make normal threads inaccessible in PS3 memory.
This commit is contained in:
parent
f8d1f070f5
commit
0fec99e75b
@ -1672,7 +1672,8 @@ spu_thread::spu_thread(lv2_spu_group* group, u32 index, std::string_view name, u
|
||||
}
|
||||
else
|
||||
{
|
||||
vm::get(vm::spu)->falloc(SPU_FAKE_BASE_ADDR + SPU_LS_SIZE * (cpu_thread::id & 0xffffff), SPU_LS_SIZE, &shm);
|
||||
// 0x1000 indicates falloc to allocate page with no access rights in base memory
|
||||
vm::get(vm::spu)->falloc(SPU_FAKE_BASE_ADDR + SPU_LS_SIZE * (cpu_thread::id & 0xffffff), SPU_LS_SIZE, &shm, 0x1000);
|
||||
}
|
||||
|
||||
vm::writer_lock(0);
|
||||
|
@ -1173,7 +1173,7 @@ namespace vm
|
||||
return 0;
|
||||
}
|
||||
|
||||
u8 pflags = page_readable | page_writable;
|
||||
u8 pflags = flags & 0x1000 ? 0 : page_readable | page_writable;
|
||||
|
||||
if ((flags & SYS_MEMORY_PAGE_SIZE_64K) == SYS_MEMORY_PAGE_SIZE_64K)
|
||||
{
|
||||
@ -1230,7 +1230,7 @@ namespace vm
|
||||
return 0;
|
||||
}
|
||||
|
||||
u8 pflags = page_readable | page_writable;
|
||||
u8 pflags = flags & 0x1000 ? 0 : page_readable | page_writable;
|
||||
|
||||
if ((flags & SYS_MEMORY_PAGE_SIZE_64K) == SYS_MEMORY_PAGE_SIZE_64K)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user