mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-23 06:46:02 +00:00
perf: Wine's write watches stop costing a signal per page on arm64 (#1333)
Wine asks for userfaultfd with the i386 syscall number on arm64, so it never gets one and falls back to mprotect and a SIGSEGV per first write, which under proot is a ptrace stop each time. libblsession hands it the real userfaultfd and, where Android refuses the PAGEMAP_SCAN ioctl, answers it from /proc/self/pagemap and UFFDIO_WRITEPROTECT.
This commit is contained in:
1 parent
9a4a611d38
commit
f27d0b006f
9 files changed
+245
-4
No files matched your search
@@ -230,7 +230,7 @@ class Openat2PreloadTest(unittest.TestCase):
|
||||
cls.tmp = Path(tempfile.mkdtemp())
|
||||
cls.lib = cls.tmp / "libopenat2.so"
|
||||
subprocess.run(["cc", "-O2", "-Wall", "-Werror", "-fPIC", "-shared", "-pthread", "-o", str(cls.lib),
|
||||
str(PRELOAD / "robust.c"), str(PRELOAD / "fsync.c"), str(PRELOAD / "noexec.c"), "-ldl"], check=True)
|
||||
str(PRELOAD / "robust.c"), str(PRELOAD / "fsync.c"), str(PRELOAD / "noexec.c"), str(PRELOAD / "writewatch.c"), "-ldl"], check=True)
|
||||
source = cls.tmp / "openat2.c"
|
||||
source.write_text(PROGRAM)
|
||||
subprocess.run(["cc", "-O2", "-Wall", "-Werror", "-o", str(cls.tmp / "openat2"), str(source), "-ldl"], check=True)
|
||||
|
||||
Reference in new issue
Block a user