summary refs log tree commit diff
path: root/ripple/minitrace
diff options
context:
space:
mode:
authoredef <edef@unfathomable.blue>2022-07-29 21:22:49 +0000
committeredef <edef@unfathomable.blue>2022-07-29 21:22:49 +0000
commite400322ef04999dfd58c444e622b6d7a8327e810 (patch)
tree9657b7bfffe84ec99e92a511379628a66de09155 /ripple/minitrace
parenta11f67c619d80d51db486e3863bd374b1377a6e7 (diff)
downloadunf-legacy-e400322ef04999dfd58c444e622b6d7a8327e810.tar.zst
ripple/minitrace: verify rt_sigaction sigsetsize strictly
Change-Id: I053f3f261963d955b0e54b20e5cd42f81b3e6a57
Diffstat (limited to 'ripple/minitrace')
-rw-r--r--ripple/minitrace/src/main.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/ripple/minitrace/src/main.rs b/ripple/minitrace/src/main.rs
index 01f7d18..952aaf1 100644
--- a/ripple/minitrace/src/main.rs
+++ b/ripple/minitrace/src/main.rs
@@ -478,6 +478,18 @@ fn check_syscall(entry: &SyscallEntry) -> bool {
 		SyscallEntry::mprotect { addr, len, prot: _ } => {
 			return addr % 4096 == 0 && len % 4096 == 0;
 		}
+		SyscallEntry::rt_sigaction {
+			sig: _,
+			act: _,
+			oact: _,
+			sigsetsize,
+		} => {
+			if sigsetsize != 8 {
+				panic!(
+					"rt_sigaction(2) sigsetsize should be sizeof (sigset_t), actually {sigsetsize}"
+				);
+			}
+		}
 		SyscallEntry::access { ref filename, mode } => {
 			println!("access({filename:?}, {mode:?})");
 		}