[PATCH 10/26] clone: Use separate xlat for nstype parameter of setns syscall
Eugene Syromyatnikov
evgsyr at gmail.com
Mon Oct 24 03:01:11 UTC 2016
nstype is not flag set but specific type value against which it is
compared in kernel (see kernel/nsproxy.c, SYSCALL_DEFINE2(setns, ...)).
* xlat/setns_types.in: New file.
* clone.c: Use printxval and setns_types for nstype parameter.
---
clone.c | 3 ++-
xlat/setns_types.in | 8 ++++++++
2 files changed, 10 insertions(+), 1 deletion(-)
create mode 100644 xlat/setns_types.in
diff --git a/clone.c b/clone.c
index 604a695..0dd4fc9 100644
--- a/clone.c
+++ b/clone.c
@@ -38,6 +38,7 @@
#endif
#include "xlat/clone_flags.h"
+#include "xlat/setns_types.h"
#if defined IA64
# define ARG_FLAGS 0
@@ -144,7 +145,7 @@ SYS_FUNC(setns)
{
printfd(tcp, tcp->u_arg[0]);
tprints(", ");
- printflags(clone_flags, tcp->u_arg[1], "CLONE_???");
+ printxval(setns_types, tcp->u_arg[1], "CLONE_NEW???");
return RVAL_DECODED;
}
diff --git a/xlat/setns_types.in b/xlat/setns_types.in
new file mode 100644
index 0000000..09186f2
--- /dev/null
+++ b/xlat/setns_types.in
@@ -0,0 +1,8 @@
+0
+CLONE_NEWNS 0x00020000
+CLONE_NEWCGROUP 0x02000000
+CLONE_NEWUTS 0x04000000
+CLONE_NEWIPC 0x08000000
+CLONE_NEWUSER 0x10000000
+CLONE_NEWPID 0x20000000
+CLONE_NEWNET 0x40000000
--
1.7.10.4
More information about the Strace-devel
mailing list