aboutsummaryrefslogtreecommitdiff
path: root/linux-user/strace.c
diff options
context:
space:
mode:
authorMatus Kysel <mkysel@tachyum.com>2021-04-06 14:42:03 +0000
committerLaurent Vivier <laurent@vivier.eu>2021-05-15 21:35:09 +0200
commit5847d3098d92851015e0f0c868e1305103feae02 (patch)
treec9d5891c6684b46b7da8f9ca1e5926eeda6fb3b9 /linux-user/strace.c
parent48c8c5e8862431235ec5ab553977ee5fe6ffbba7 (diff)
linux-user: strace now handles unshare syscall args correctly
Syscall unshare did not have custom print function for strace, but it's argument is same as flags in clone syscall, so it can be easily implemented. Also updated missing flags from clone_flags. Signed-off-by: Matus Kysel <mkysel@tachyum.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20210406144203.1020598-1-mkysel@tachyum.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user/strace.c')
-rw-r--r--linux-user/strace.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/linux-user/strace.c b/linux-user/strace.c
index e969121b6c..1cadb6d50f 100644
--- a/linux-user/strace.c
+++ b/linux-user/strace.c
@@ -1109,6 +1109,12 @@ UNUSED static struct flags clone_flags[] = {
#if defined(CLONE_NEWNET)
FLAG_GENERIC(CLONE_NEWNET),
#endif
+#if defined(CLONE_NEWCGROUP)
+ FLAG_GENERIC(CLONE_NEWCGROUP),
+#endif
+#if defined(CLONE_NEWTIME)
+ FLAG_GENERIC(CLONE_NEWTIME),
+#endif
#if defined(CLONE_IO)
FLAG_GENERIC(CLONE_IO),
#endif
@@ -3467,6 +3473,18 @@ print_unlinkat(void *cpu_env, const struct syscallname *name,
}
#endif
+#ifdef TARGET_NR_unshare
+static void
+print_unshare(void *cpu_env, const struct syscallname *name,
+ abi_long arg0, abi_long arg1, abi_long arg2,
+ abi_long arg3, abi_long arg4, abi_long arg5)
+{
+ print_syscall_prologue(name);
+ print_flags(clone_flags, arg0, 1);
+ print_syscall_epilogue(name);
+}
+#endif
+
#ifdef TARGET_NR_utime
static void
print_utime(void *cpu_env, const struct syscallname *name,