All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Doucha <mdoucha@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] misc/crash02: Update syscall blacklist
Date: Wed, 15 Sep 2021 17:46:59 +0200	[thread overview]
Message-ID: <20210915154659.26931-1-mdoucha@suse.cz> (raw)
Message-ID: <20210915154659.8FQMRGLP7JahQr4cQPfkkmrAeXwrJ4y3PPoRaBzgepM@z> (raw)

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

Signed-off-by: Martin Doucha <mdoucha@suse.cz>
---
 testcases/misc/crash/crash02.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/testcases/misc/crash/crash02.c b/testcases/misc/crash/crash02.c
index 66f308b70..c68f580ef 100644
--- a/testcases/misc/crash/crash02.c
+++ b/testcases/misc/crash/crash02.c
@@ -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
 	};
-- 
2.33.0


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

             reply	other threads:[~2021-09-15 15:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-15 15:46 Martin Doucha [this message]
2021-09-15 15:46 ` [LTP] [PATCH] misc/crash02: Update syscall blacklist Martin Doucha
2021-09-16 13:04   ` Cyril Hrubis
2021-09-16 13:04     ` Cyril Hrubis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210915154659.26931-1-mdoucha@suse.cz \
    --to=mdoucha@suse.cz \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.