Index: mem.c
===================================================================
RCS file: /cvsroot/strace/strace/mem.c,v
retrieving revision 1.39
diff -u -r1.39 mem.c
--- mem.c	29 Mar 2007 23:30:09 -0000	1.39
+++ mem.c	23 Jul 2007 22:22:55 -0000
@@ -703,6 +707,12 @@
 	{ 0,			NULL			}
 };
 
+static const struct xlat move_pages_flags[] = {
+	{ MPOL_MF_MOVE,		"MPOL_MF_MOVE"		},
+	{ MPOL_MF_MOVE_ALL,	"MPOL_MF_MOVE_ALL"	},
+	{ 0,			NULL			}
+};
+
 
 static void
 get_nodes(tcp, ptr, maxnodes, err)
@@ -794,4 +804,76 @@
 	}
 	return 0;
 }
+
+int
+sys_move_pages(tcp)
+struct tcb *tcp;
+{
+	if (entering(tcp)) {
+		unsigned long npages = tcp->u_arg[1];
+		tprintf("%ld, %lu, ", tcp->u_arg[0], npages);
+		if (tcp->u_arg[2] == 0)
+			tprintf("NULL, ");
+		else {
+			int i;
+			long puser = tcp->u_arg[2];
+			tprintf("{");
+			for (i = 0; i < npages; ++i) {
+				void *p;
+				if (i > 0)
+					tprintf(", ");
+				if (umove(tcp, puser, &p) < 0) {
+					tprintf("???");
+					break;
+				}
+				tprintf("%p", p);
+				puser += sizeof (void *);
+			}
+			tprintf("}, ");
+		}
+		if (tcp->u_arg[3] == 0)
+			tprintf("NULL, ");
+		else {
+			int i;
+			long nodeuser = tcp->u_arg[3];
+			tprintf("{");
+			for (i = 0; i < npages; ++i) {
+				int node;
+				if (i > 0)
+					tprintf(", ");
+				if (umove(tcp, nodeuser, &node) < 0) {
+					tprintf("???");
+					break;
+				}
+				tprintf("%#x", node);
+				nodeuser += sizeof (int);
+			}
+			tprintf("}, ");
+		}
+	}
+	if (exiting(tcp)) {
+		unsigned long npages = tcp->u_arg[1];
+		if (tcp->u_arg[4] == 0)
+			tprintf("NULL, ");
+		else {
+			int i;
+			long statususer = tcp->u_arg[4];
+			tprintf("{");
+			for (i = 0; i < npages; ++i) {
+				int status;
+				if (i > 0)
+					tprintf(", ");
+				if (umove(tcp, statususer, &status) < 0) {
+					tprintf("???");
+					break;
+				}
+				tprintf("%#x", status);
+				statususer += sizeof (int);
+			}
+			tprintf("}, ");
+		}
+		printflags(move_pages_flags, tcp->u_arg[5], "MPOL_???");
+	}
+	return 0;
+}
 #endif
Index: linux/syscall.h
===================================================================
RCS file: /cvsroot/strace/strace/linux/syscall.h,v
retrieving revision 1.48
diff -u -r1.48 syscall.h
--- linux/syscall.h	13 Oct 2006 20:25:13 -0000	1.48
+++ linux/syscall.h	23 Jul 2007 22:22:55 -0000
@@ -99,7 +99,7 @@
 int sys_mq_notify(), sys_mq_getsetattr();
 int sys_epoll_create(), sys_epoll_ctl(), sys_epoll_wait();
 int sys_waitid(), sys_fadvise64(), sys_fadvise64_64();
-int sys_mbind(), sys_get_mempolicy(), sys_set_mempolicy();
+int sys_mbind(), sys_get_mempolicy(), sys_set_mempolicy(), sys_move_pages();
 int sys_arch_prctl();
 int sys_io_setup(), sys_io_submit(), sys_io_cancel(), sys_io_getevents(), sys_io_destroy();
 
Index: linux/syscallent.h
===================================================================
RCS file: /cvsroot/strace/strace/linux/syscallent.h,v
retrieving revision 1.42
diff -u -r1.42 syscallent.h
--- linux/syscallent.h	5 Jul 2007 19:28:35 -0000	1.42
+++ linux/syscallent.h	23 Jul 2007 22:22:56 -0000
@@ -347,7 +347,7 @@
 	{ 4,	TD,	printargs,		"sync_file_range" }, /* 314 */
 	{ 4,	TD,	printargs,		"tee"		}, /* 315 */
 	{ 4,	TD,	printargs,		"vmsplice"	}, /* 316 */
-	{ 5,	0,	printargs,		"SYS_317"	}, /* 317 */
+	{ 5,	0,	sys_move_pages,		"move_pages"	}, /* 317 */
 	{ 5,	0,	printargs,		"SYS_318"	}, /* 318 */
 	{ 5,	0,	printargs,		"SYS_319"	}, /* 319 */
 	{ 5,	0,	printargs,		"SYS_320"	}, /* 320 */
Index: linux/x86_64/syscallent.h
===================================================================
RCS file: /cvsroot/strace/strace/linux/x86_64/syscallent.h,v
retrieving revision 1.21
diff -u -r1.21 syscallent.h
--- linux/x86_64/syscallent.h	5 Jul 2007 19:28:35 -0000	1.21
+++ linux/x86_64/syscallent.h	23 Jul 2007 22:22:56 -0000
@@ -277,3 +277,4 @@
 	{ 4,	TD,	printargs,		"sync_file_range" }, /* 276 */
 	{ 4,	TD,	printargs,		"tee"		}, /* 277 */
 	{ 4,	TD,	printargs,		"vmsplice"	}, /* 278 */
+	{ 5,	0,	sys_move_pages,		"move_pages"	}, /* 279 */
