Skip to contentSkip to conversation

misc/crash02: Update syscall blacklist

PATCH New Martin Doucha 2 participants 2 messages Sep 15, 2021 – Sep 16, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 misc/crash02: Update syscall blacklist

- fork() and vfork() are not mutually exclusive, blacklist both
- read() will sleep indefinitely if the first argument is 0

---
 testcases/misc/crash/crash02.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
testcases/misc/crash/crash02.c +9 -1
index 66f308b70..c68f580ef 100644
@@ -464,7 +464,8 @@ int in_blacklist(int sysno)
 		 */
 #if defined(__NR_vfork) && __NR_vfork
 		SYS_vfork,
-#elif defined(__NR_fork) && __NR_fork
+#endif
+#if defined(__NR_fork) && __NR_fork
 		SYS_fork,
 #endif
 #endif /* __ia64__ */
@@ -476,6 +477,13 @@ int in_blacklist(int sysno)
 #endif
 #if defined(__NR_pause) && __NR_pause
 		__NR_pause,	/* int pause(void); - sleep indefinitely */
+#endif
+#if defined(__NR_read) && __NR_read
+		/*
+		 * ssize_t read(int fd, void *buf, size_t count); - will sleep
+		 * indefinitely if the first argument is 0
+		 */
+		__NR_read,
 #endif
 		-1
 	};
Signature · 1 line
2.33.0
#1 lore raw

PATCH 1/1 misc/crash02: Update syscall blacklist

Hi!
Applied, thanks.

Signature · 5 lines
Cyril Hrubis
[email protected]

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp