Re: [Qemu-devel] [PATCH v6 7/7] linux-user: Add missing Mips syscalls items in strace.list

2016-09-19 Thread Aleksandar Markovic
Thanks, I did it hard way: by copying the content of strace.list and headers in 
into columns of a spreadsheet, than processing the content so that each syscall 
has its own row, and after that doing numerous copying and pasting for syscalls 
that did not appear to have support in strace.list. In hindsight, I think 
devising a script or even a set of command lines would be much faster and 
better way of doing this.

Aleksandar

From: Laurent Vivier [laur...@vivier.eu]
Sent: Friday, September 16, 2016 12:35 PM
To: Aleksandar Markovic; qemu-devel@nongnu.org; riku.voi...@iki.fi; 
peter.mayd...@linaro.org; aurel...@aurel32.net; Leon Alrae; Petar Jovanovic; 
Miodrag Dinic; Aleksandar Rikalo; Aleksandar Markovic
Subject: Re: [Qemu-devel] [PATCH v6 7/7] linux-user: Add missing Mips syscalls 
items in strace.list

Le 16/09/2016 à 13:14, Aleksandar Markovic a écrit :
> From: Aleksandar Markovic <aleksandar.marko...@imgtec.com>
>
> Without this patch, a number of Mips syscalls will be logged in the following
> way (in this examople, this is an invocation of accept4()):
>
>   86906 Unknown syscall 4334
>
> This patch provides standard Qemu's strace output for such cases, like this:
>
>   95861 accept4(3,1996486000,1996486016,128,0,0) = 5
>
> Such output may be further improvad by providing strace-related functions
> that handle only particular syscalls, but this is beyond the scope of
> this patch.
>
> Signed-off-by: Aleksandar Markovic <aleksandar.marko...@imgtec.com>
> ---
>  linux-user/strace.list | 114 
> +
>  1 file changed, 114 insertions(+)

Nice work, we should update strace.list each time we add a syscall (and
personally I don't, it's bad).

How did you choose the list of syscalls to add in this list as some of
them are not implemented in syscall.c?
[for instance "kcmp", I have the patch for it but I don't think I've
already sent it]

Laurent



Re: [Qemu-devel] [PATCH v6 7/7] linux-user: Add missing Mips syscalls items in strace.list

2016-09-16 Thread Laurent Vivier


Le 16/09/2016 à 13:14, Aleksandar Markovic a écrit :
> From: Aleksandar Markovic 
> 
> Without this patch, a number of Mips syscalls will be logged in the following
> way (in this examople, this is an invocation of accept4()):
> 
>   86906 Unknown syscall 4334
> 
> This patch provides standard Qemu's strace output for such cases, like this:
> 
>   95861 accept4(3,1996486000,1996486016,128,0,0) = 5
> 
> Such output may be further improvad by providing strace-related functions
> that handle only particular syscalls, but this is beyond the scope of
> this patch.
> 
> Signed-off-by: Aleksandar Markovic 
> ---
>  linux-user/strace.list | 114 
> +
>  1 file changed, 114 insertions(+)

Nice work, we should update strace.list each time we add a syscall (and
personally I don't, it's bad).

How did you choose the list of syscalls to add in this list as some of
them are not implemented in syscall.c?
[for instance "kcmp", I have the patch for it but I don't think I've
already sent it]

Laurent



[Qemu-devel] [PATCH v6 7/7] linux-user: Add missing Mips syscalls items in strace.list

2016-09-16 Thread Aleksandar Markovic
From: Aleksandar Markovic 

Without this patch, a number of Mips syscalls will be logged in the following
way (in this examople, this is an invocation of accept4()):

  86906 Unknown syscall 4334

This patch provides standard Qemu's strace output for such cases, like this:

  95861 accept4(3,1996486000,1996486016,128,0,0) = 5

Such output may be further improvad by providing strace-related functions
that handle only particular syscalls, but this is beyond the scope of
this patch.

Signed-off-by: Aleksandar Markovic 
---
 linux-user/strace.list | 114 +
 1 file changed, 114 insertions(+)

diff --git a/linux-user/strace.list b/linux-user/strace.list
index aa967a2..608f7e0 100644
--- a/linux-user/strace.list
+++ b/linux-user/strace.list
@@ -6,6 +6,9 @@
 #ifdef TARGET_NR_accept
 { TARGET_NR_accept, "accept" , NULL, print_accept, NULL },
 #endif
+#ifdef TARGET_NR_accept4
+{ TARGET_NR_accept4, "accept4" , NULL, NULL, NULL },
+#endif
 #ifdef TARGET_NR_access
 { TARGET_NR_access, "access" , NULL, print_access, NULL },
 #endif
@@ -39,6 +42,9 @@
 #ifdef TARGET_NR_bind
 { TARGET_NR_bind, "bind" , NULL, NULL, NULL },
 #endif
+#ifdef TARGET_NR_bpf
+{ TARGET_NR_bpf, "bpf" , NULL, NULL, NULL },
+#endif
 #ifdef TARGET_NR_break
 { TARGET_NR_break, "break" , NULL, NULL, NULL },
 #endif
@@ -123,18 +129,30 @@
 #ifdef TARGET_NR_epoll_ctl_old
 { TARGET_NR_epoll_ctl_old, "epoll_ctl_old" , NULL, NULL, NULL },
 #endif
+#ifdef TARGET_NR_epoll_pwait
+{ TARGET_NR_epoll_pwait, "epoll_pwait" , NULL, NULL, NULL },
+#endif
 #ifdef TARGET_NR_epoll_wait
 { TARGET_NR_epoll_wait, "epoll_wait" , NULL, NULL, NULL },
 #endif
 #ifdef TARGET_NR_epoll_wait_old
 { TARGET_NR_epoll_wait_old, "epoll_wait_old" , NULL, NULL, NULL },
 #endif
+#ifdef TARGET_NR_eventfd
+{ TARGET_NR_eventfd, "eventfd" , NULL, NULL, NULL },
+#endif
+#ifdef TARGET_NR_eventfd2
+{ TARGET_NR_eventfd2, "eventfd2" , NULL, NULL, NULL },
+#endif
 #ifdef TARGET_NR_execv
 { TARGET_NR_execv, "execv" , NULL, print_execv, NULL },
 #endif
 #ifdef TARGET_NR_execve
 { TARGET_NR_execve, "execve" , NULL, print_execve, NULL },
 #endif
+#ifdef TARGET_NR_execveat
+{ TARGET_NR_execveat, "execveat" , NULL, NULL, NULL },
+#endif
 #ifdef TARGET_NR_exec_with_loader
 { TARGET_NR_exec_with_loader, "exec_with_loader" , NULL, NULL, NULL },
 #endif
@@ -156,6 +174,15 @@
 #ifdef TARGET_NR_fadvise64_64
 { TARGET_NR_fadvise64_64, "fadvise64_64" , NULL, NULL, NULL },
 #endif
+#ifdef TARGET_NR_fallocate
+{ TARGET_NR_fallocate, "fallocate" , NULL, NULL, NULL },
+#endif
+#ifdef TARGET_NR_fanotify_init
+{ TARGET_NR_fanotify_init, "fanotify_init" , NULL, NULL, NULL },
+#endif
+#ifdef TARGET_NR_fanotify_mark
+{ TARGET_NR_fanotify_mark, "fanotify_mark" , NULL, NULL, NULL },
+#endif
 #ifdef TARGET_NR_fchdir
 { TARGET_NR_fchdir, "fchdir" , NULL, NULL, NULL },
 #endif
@@ -186,6 +213,9 @@
 #ifdef TARGET_NR_fgetxattr
 { TARGET_NR_fgetxattr, "fgetxattr" , NULL, NULL, NULL },
 #endif
+#ifdef TARGET_NR_finit_module
+{ TARGET_NR_finit_module, "finit_module" , NULL, NULL, NULL },
+#endif
 #ifdef TARGET_NR_flistxattr
 { TARGET_NR_flistxattr, "flistxattr" , NULL, NULL, NULL },
 #endif
@@ -231,6 +261,9 @@
 #ifdef TARGET_NR_futimesat
 { TARGET_NR_futimesat, "futimesat" , NULL, print_futimesat, NULL },
 #endif
+#ifdef TARGET_NR_getcpu
+{ TARGET_NR_getcpu, "getcpu" , "%s(%p,%d)", NULL, NULL },
+#endif
 #ifdef TARGET_NR_getcwd
 { TARGET_NR_getcwd, "getcwd" , "%s(%p,%d)", NULL, NULL },
 #endif
@@ -306,6 +339,9 @@
 #ifdef TARGET_NR_getpriority
 { TARGET_NR_getpriority, "getpriority", "%s(%#x,%#x)", NULL, NULL },
 #endif
+#ifdef TARGET_NR_getrandom
+{ TARGET_NR_getrandom, "getrandom", NULL, NULL, NULL },
+#endif
 #ifdef TARGET_NR_getresgid
 { TARGET_NR_getresgid, "getresgid" , NULL, NULL, NULL },
 #endif
@@ -379,6 +415,9 @@
 #ifdef TARGET_NR_inotify_init
 { TARGET_NR_inotify_init, "inotify_init" , NULL, NULL, NULL },
 #endif
+#ifdef TARGET_NR_inotify_init1
+{ TARGET_NR_inotify_init1, "inotify_init1" , NULL, NULL, NULL },
+#endif
 #ifdef TARGET_NR_inotify_rm_watch
 { TARGET_NR_inotify_rm_watch, "inotify_rm_watch" , NULL, NULL, NULL },
 #endif
@@ -415,6 +454,9 @@
 #ifdef TARGET_NR_ipc
 { TARGET_NR_ipc, "ipc" , NULL, print_ipc, NULL },
 #endif
+#ifdef TARGET_NR_kcmp
+{ TARGET_NR_kcmp, "kcmp" , NULL, NULL, NULL },
+#endif
 #ifdef TARGET_NR_kexec_load
 { TARGET_NR_kexec_load, "kexec_load" , NULL, NULL, NULL },
 #endif
@@ -484,6 +526,12 @@
 #ifdef TARGET_NR_mbind
 { TARGET_NR_mbind, "mbind" , NULL, NULL, NULL },
 #endif
+#ifdef TARGET_NR_membarrier
+{ TARGET_NR_membarrier, "membarrier" , NULL, NULL, NULL },
+#endif
+#ifdef TARGET_NR_memfd_create
+{ TARGET_NR_memfd_create, "memfd_create" , NULL, NULL, NULL },
+#endif
 #ifdef TARGET_NR_memory_ordering
 { TARGET_NR_memory_ordering, "memory_ordering" , NULL, NULL, NULL },
 #endif
@@ -511,6 +559,9 @@
 #ifdef TARGET_NR_mlock
 { TARGET_NR_mlock, "mlock" , NULL, NULL, NULL },
 #endif