aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYifan Lu2016-11-01 23:55:15 -0700
committerYifan Lu2016-11-01 23:55:15 -0700
commite2d95168b7ccb3e1501483df23afd5fba875905a (patch)
tree3dc41e8846250e9812b08479c0f8cb211ad59b91
parentAdded passing of the opt data to records (diff)
downloadsubstitute-e2d95168b7ccb3e1501483df23afd5fba875905a.tar.gz
Flush cache for mirror too
-rw-r--r--lib/vita/execmem.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/vita/execmem.c b/lib/vita/execmem.c
index ca94b89..ba772ae 100644
--- a/lib/vita/execmem.c
+++ b/lib/vita/execmem.c
@@ -89,6 +89,7 @@ int execmem_seal(void *ptr, void *opt) {
vma = slab_getmirror(slab, ptr);
LOG("mirror addr %p", vma);
+ cache_flush(KERNEL_PID, (uintptr_t)ptr, PATCH_ITEM_SIZE);
cache_flush(slab->pid, vma, PATCH_ITEM_SIZE);
return SUBSTITUTE_OK;
@@ -128,7 +129,7 @@ int execmem_foreign_write_with_pc_patch(struct execmem_foreign_write *writes,
pid = sceKernelGetProcessId();
LOG("sceKernelGetProcessId: %x", pid);
}
- LOG("PID:%d, dst:%p, src:%p, len:%x", pid, writes[i].dst, writes[i].src, writes[i].len);
+ LOG("PID:%x, dst:%p, src:%p, len:%x", pid, writes[i].dst, writes[i].src, writes[i].len);
if (pid == KERNEL_PID) {
sceKernelCpuUnrestrictedMemcpy(writes[i].dst, writes[i].src, writes[i].len);
} else {