Skip to content
Snippets Groups Projects
Commit 5847d309 authored by Matus Kysel's avatar Matus Kysel Committed by Laurent Vivier
Browse files

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: default avatarMatus Kysel <mkysel@tachyum.com>
Reviewed-by: default avatarLaurent Vivier <laurent@vivier.eu>
Message-Id: <20210406144203.1020598-1-mkysel@tachyum.com>
Signed-off-by: default avatarLaurent Vivier <laurent@vivier.eu>
parent 48c8c5e8
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
......@@ -1573,7 +1573,7 @@
{ TARGET_NR_unlinkat, "unlinkat" , NULL, print_unlinkat, NULL },
#endif
#ifdef TARGET_NR_unshare
{ TARGET_NR_unshare, "unshare" , NULL, NULL, NULL },
{ TARGET_NR_unshare, "unshare" , NULL, print_unshare, NULL },
#endif
#ifdef TARGET_NR_userfaultfd
{ TARGET_NR_userfaultfd, "userfaultfd" , NULL, NULL, NULL },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment