summary refs log tree commit diff stats
path: root/results/scraper/fex/3675
diff options
context:
space:
mode:
authorChristian Krinitsin <mail@krinitsin.com>2025-07-17 09:10:43 +0200
committerChristian Krinitsin <mail@krinitsin.com>2025-07-17 09:10:43 +0200
commitf2ec263023649e596c5076df32c2d328bc9393d2 (patch)
tree5dd86caab46e552bd2e62bf9c4fb1a7504a44db4 /results/scraper/fex/3675
parent63d2e9d409831aa8582787234cae4741847504b7 (diff)
downloadqemu-analysis-main.tar.gz
qemu-analysis-main.zip
add downloaded fex bug-reports HEAD main
Diffstat (limited to 'results/scraper/fex/3675')
-rw-r--r--results/scraper/fex/367533
1 files changed, 33 insertions, 0 deletions
diff --git a/results/scraper/fex/3675 b/results/scraper/fex/3675
new file mode 100644
index 000000000..2a4727877
--- /dev/null
+++ b/results/scraper/fex/3675
@@ -0,0 +1,33 @@
+Sifu and RDR break FEX's SMC tracking logic
+Both Sifu and RDR break FEX's SMC tracking logic due to the ordering it does mprotects in. Nailed down where it is happening, now I just need to fix it.

+

+small unittest which reproduces without running the full game.

+```cpp

+#include <cstdint>

+#include <sys/mman.h>

+#include <unistd.h>

+#include <sys/syscall.h>

+

+int main() {

+

+  // Original:

+  // Base: 0x6ffffc0b8000

+  // PtrHigh: 0x6ffffc0be000 (+0x6000)

+  // PtrLow: 0x6ffffc0bd000 (+0x5000)

+  const uint64_t PtrBase = 0x10'0000;

+  const uint64_t PtrLow = PtrBase + 0x1000;

+  const uint64_t PtrLowSize = 0x2000;

+  const uint64_t PtrHigh = PtrBase + 0x2000;

+  const uint64_t PtrHighSize = 0x1000;

+  const uint64_t TotalSize = PtrHigh + 0x1000 - PtrBase;

+

+  (void)mmap((void*)PtrBase, TotalSize, PROT_NONE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, -1, 0);

+

+  // Order matters.

+  mprotect((void*)PtrHigh, PtrHighSize, PROT_READ);

+  mprotect((void*)PtrLow, PtrLowSize, PROT_READ);

+

+  ::syscall(SYS_exit_group, 0);

+  return 0;

+}

+```
\ No newline at end of file