diff options
Diffstat (limited to 'ripple/minitrace/src')
-rw-r--r-- | ripple/minitrace/src/main.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ripple/minitrace/src/main.rs b/ripple/minitrace/src/main.rs index 4bd544f..24737b0 100644 --- a/ripple/minitrace/src/main.rs +++ b/ripple/minitrace/src/main.rs @@ -447,13 +447,16 @@ const AT_FDCWD: i32 = -100; fn check_syscall(entry: &SyscallEntry) -> bool { match *entry { SyscallEntry::mmap { - addr: _, + addr, len: _, prot: _, flags, fd, off: _, } => { + if addr % 4096 != 0 { + return false; + } if fd == !0 { return flags.contains(MapFlags::ANONYMOUS); } else { @@ -461,6 +464,9 @@ fn check_syscall(entry: &SyscallEntry) -> bool { == MapFlags::PRIVATE; } } + SyscallEntry::mprotect { addr, len, prot: _ } => { + return addr % 4096 == 0 && len % 4096 == 0; + } SyscallEntry::access { ref filename, mode: _, |