From d6da8cc095aa87488404fc796b0a6924e8f692cf Mon Sep 17 00:00:00 2001 From: edef Date: Sun, 31 Jul 2022 02:02:26 +0000 Subject: ripple/minitrace: ensure anonymous mmap offset is 0 Change-Id: Ia7a8dc32bdcb97c002219e81080849b9f980ce95 --- ripple/minitrace/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ripple/minitrace/src/main.rs b/ripple/minitrace/src/main.rs index 34c503c..c63cd88 100644 --- a/ripple/minitrace/src/main.rs +++ b/ripple/minitrace/src/main.rs @@ -297,7 +297,7 @@ fn check_syscall(entry: &SyscallEntry) -> bool { prot: _, flags, fd, - off: _, + off, } => { if addr % 4096 != 0 { return false; @@ -305,7 +305,7 @@ fn check_syscall(entry: &SyscallEntry) -> bool { match fd { None => { - return flags.contains(MapFlags::ANONYMOUS); + return flags.contains(MapFlags::ANONYMOUS) && off == 0; } Some(_) => { return flags.intersection(MapFlags::PRIVATE | MapFlags::ANONYMOUS) -- cgit 1.4.1