Created
May 20, 2014 04:56
-
-
Save unknownbrackets/4df90063fc062b998600 to your computer and use it in GitHub Desktop.
Potential test for PS3 memory mirrors / ranges
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@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]