Enhance setns syscall decoding
authorMasatake YAMATO <yamato@redhat.com>
Tue, 13 May 2014 16:46:04 +0000 (01:46 +0900)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 13 May 2014 23:22:47 +0000 (23:22 +0000)
* process.c (sys_setns): New function.
Decode the 2nd syscall argument using clone_flags.
* linux/syscall.h (sys_setns): New prototype.
* linux/dummy.h (sys_setns): Remove.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
linux/dummy.h
linux/syscall.h
process.c

index 2371673741597d858b427270e285646ebbe019b1..4f3e92029f6ac3b903791ff5e21f1eeaa030346d 100644 (file)
@@ -79,7 +79,6 @@
 #define        sys_set_robust_list     sys_munmap
 #define        sys_setfsgid            sys_setfsuid
 #define        sys_setgid              sys_setuid
-#define        sys_setns               sys_inotify_rm_watch
 #define        sys_setregid            sys_setreuid
 #define        sys_setresgid           sys_setresuid
 #define        sys_swapoff             sys_chdir
index cfa9086d961f8ce6756248d5081a074267e19b48..1943297689de8d9d0dfbe9b0f4ab4c188f95a16d 100644 (file)
@@ -241,6 +241,7 @@ int sys_setgroups();
 int sys_setgroups32();
 int sys_sethostname();
 int sys_setitimer();
+int sys_setns();
 int sys_setpriority();
 int sys_setresuid();
 int sys_setreuid();
index 132531910f1d68bc34cd0cb9b6994e5ccf9ab134..4347a872b003de75b700c4de360cfa2572f79bd2 100644 (file)
--- a/process.c
+++ b/process.c
@@ -584,6 +584,17 @@ sys_clone(struct tcb *tcp)
        return 0;
 }
 
+int
+sys_setns(struct tcb *tcp)
+{
+       if (entering(tcp)) {
+               printfd(tcp, tcp->u_arg[0]);
+               tprints(", ");
+               printflags(clone_flags, tcp->u_arg[1], "CLONE_???");
+       }
+       return 0;
+}
+
 int
 sys_unshare(struct tcb *tcp)
 {