summary refs log tree commit diff
path: root/ripple/minitrace
diff options
context:
space:
mode:
authoredef <edef@unfathomable.blue>2022-07-31 02:02:26 +0000
committeredef <edef@unfathomable.blue>2022-07-31 02:02:26 +0000
commitd6da8cc095aa87488404fc796b0a6924e8f692cf (patch)
tree268f7774e9aee4f47d04b2b44f1e4aa55362e0ac /ripple/minitrace
parentf201365cc42088068044e5b5b7dea1a3d9320039 (diff)
downloadunf-legacy-d6da8cc095aa87488404fc796b0a6924e8f692cf.tar.zst
ripple/minitrace: ensure anonymous mmap offset is 0
Change-Id: Ia7a8dc32bdcb97c002219e81080849b9f980ce95
Diffstat (limited to 'ripple/minitrace')
-rw-r--r--ripple/minitrace/src/main.rs4
1 files 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)