Skip to content

Instantly share code, notes, and snippets.

@unknownbrackets
Created May 20, 2014 04:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save unknownbrackets/4df90063fc062b998600 to your computer and use it in GitHub Desktop.
Save unknownbrackets/4df90063fc062b998600 to your computer and use it in GitHub Desktop.
Potential test for PS3 memory mirrors / ranges
int g;
int f() {
return 42;
}
int main() {
int v;
printf("Memory addresses:\n");
printf("[*] Global: %p\n", &g);
printf("[*] Stack: %p\n", &v);
printf("[*] Func: %p\n", &f);
printf("Mirroring:\n");
// TODO: When addresses ranges are known, check mirrors.
// For example, if f < 0x30000000 and v >= 0x30000000, let's say...
//u64 *f_execMem = (u64 *)((u64)&f | 0x00000000);
//u64 *f_mainMem = (u64 *)((u64)&f | 0x30000000);
//printf("Main: %016llx, exec: %016llx\n", *f_mainMem, *f_execMem);
return 0;
}
@unknownbrackets
Copy link
Author

@AlexAltea: how about a test like this?

It could be that the same ram is mapped into multiple ranges, and is only writable from certain views. Or, the ps3 might dynamically memory map and there's no mirroring.

-[Unknown]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment