All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <20090615171645.GA15217@us.ibm.com>

diff --git a/a/1.txt b/N1/1.txt
index 6edc2b0..3bd8d06 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -3,132 +3,3 @@ Here is an update:
 
 thanks,
 -serge
-
-From 788c5bcc14211608f187f36d327a9d6d87b19755 Mon Sep 17 00:00:00 2001
-From: Serge E. Hallyn <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
-Date: Mon, 15 Jun 2009 12:14:11 -0400
-Subject: [PATCH 2/2] clone_with_pids: define the s390 syscall
-
-Hook up the clone_with_pids system call for s390x.  clone_with_pids()
-takes an additional argument over clone(), which we pass in through
-register 7.  Stub code for using the syscall looks like:
-
-struct target_pid_set {
-        int num_pids;
-        pid_t *target_pids;
-        unsigned long flags;
-};
-
-        register unsigned long int __r2 asm ("2") = (unsigned long int)(stack);\
-        register unsigned long int __r3 asm ("3") = (unsigned long int)(flags);\
-        register unsigned long int __r4 asm ("4") = (unsigned long int)(NULL); \
-        register unsigned long int __r5 asm ("5") = (unsigned long int)(NULL); \
-        register unsigned long int __r6 asm ("6") = (unsigned long int)(NULL); \
-        register unsigned long int __r7 asm ("7") = (unsigned long int)(setp); \
-        register unsigned long int __result asm ("2"); \
-        __asm__ __volatile__( \
-                " lghi %%r1,332\n" \
-                " svc 0\n" \
-                : "=d" (__result) \
-                : "0" (__r2), "d" (__r3), \
-                  "d" (__r4), "d" (__r5), "d" (__r6), "d" (__r7) \
-                : "1", "cc", "memory" \
-        ); \
-                __result; \
-        })
-
-        struct target_pid_set pid_set;
-        int pids[1] = { 19799 };
-        pid_set.num_pids = 1;
-        pid_set.target_pids = &pids[0];
-        pid_set.flags = 0;
-
-        rc = do_clone_with_pids(topstack, clone_flags, setp);
-	if (rc == 0)
-		printf("Child\n");
-	else if (rc > 0)
-		printf("Parent: child pid %d\n", rc);
-	else
-		printf("Error %d\n", rc);
-
-Signed-off-by: Serge E. Hallyn <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
----
- arch/s390/include/asm/unistd.h    |    3 ++-
- arch/s390/kernel/compat_wrapper.S |   10 ++++++++++
- arch/s390/kernel/process.c        |   19 +++++++++++++++++++
- arch/s390/kernel/syscalls.S       |    1 +
- 4 files changed, 32 insertions(+), 1 deletions(-)
-
-diff --git a/arch/s390/include/asm/unistd.h b/arch/s390/include/asm/unistd.h
-index 3d22f17..d2facab 100644
---- a/arch/s390/include/asm/unistd.h
-+++ b/arch/s390/include/asm/unistd.h
-@@ -269,7 +269,8 @@
- #define	__NR_pwritev		329
- #define __NR_checkpoint		330
- #define __NR_restart		331
--#define NR_syscalls 332
-+#define __NR_clone_with_pids	332
-+#define NR_syscalls 333
- 
- /* 
-  * There are some system calls that are not present on 64 bit, some
-diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S
-index c2228b2..bf13315 100644
---- a/arch/s390/kernel/compat_wrapper.S
-+++ b/arch/s390/kernel/compat_wrapper.S
-@@ -1837,3 +1837,13 @@ sys_restore_wrapper:
- 	lgfr	%r3,%r3			# int
- 	llgfr	%r4,%r4			# unsigned long
- 	jg	compat_sys_restore
-+
-+	.globl sys_clone_with_pids_wrapper
-+sys_clone_with_pids_wrapper:
-+	llgfr	%r2,%r2			# unsigned long
-+	llgfr	%r3,%r3			# unsigned long
-+	llgtr	%r4,%r4			# int *
-+	llgtr	%r5,%r5			# int *
-+	llgtr	%r6,%r6			# void *
-+	llgtr	%r7,%r7			# void *
-+	jg	compat_sys_clone_with_pids
-diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
-index a3acd8e..fa187bf 100644
---- a/arch/s390/kernel/process.c
-+++ b/arch/s390/kernel/process.c
-@@ -246,6 +246,25 @@ SYSCALL_DEFINE0(clone)
- 		       parent_tidptr, child_tidptr);
- }
- 
-+SYSCALL_DEFINE0(clone_with_pids)
-+{
-+	struct pt_regs *regs = task_pt_regs(current);
-+	unsigned long clone_flags;
-+	unsigned long newsp;
-+	int __user *parent_tidptr, *child_tidptr;
-+	void __user *upid_setp;
-+
-+	clone_flags = regs->gprs[3];
-+	newsp = regs->orig_gpr2;
-+	parent_tidptr = (int __user *) regs->gprs[4];
-+	child_tidptr = (int __user *) regs->gprs[5];
-+	upid_setp = (void __user *) regs->gprs[7];
-+	if (!newsp)
-+		newsp = regs->gprs[15];
-+	return do_fork_with_pids(clone_flags, newsp, regs, 0, parent_tidptr,
-+			child_tidptr, upid_setp);
-+}
-+
- /*
-  * This is trivial, and on the face of it looks like it
-  * could equally well be done in user mode.
-diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S
-index e755e93..1d638f5 100644
---- a/arch/s390/kernel/syscalls.S
-+++ b/arch/s390/kernel/syscalls.S
-@@ -340,3 +340,4 @@ SYSCALL(sys_preadv,sys_preadv,compat_sys_preadv_wrapper)
- SYSCALL(sys_pwritev,sys_pwritev,compat_sys_pwritev_wrapper)
- SYSCALL(sys_checkpoint,sys_checkpoint,sys_checkpoint_wrapper) /* 330 */
- SYSCALL(sys_restart,sys_restart,sys_restore_wrapper)
-+SYSCALL(sys_clone_with_pids,sys_clone_with_pids,sys_clone_with_pids_wrapper)
--- 
-1.6.1
diff --git a/a/content_digest b/N1/content_digest
index 95163ae..8bddeaf 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -1,146 +1,14 @@
- "ref\020090615170443.GA14808@us.ibm.com\0"
  "ref\020090615170524.GA14950@us.ibm.com\0"
- "ref\020090615170524.GA14950-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org\0"
- "From\0Serge E. Hallyn <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>\0"
+ "From\0Serge E. Hallyn <serue@us.ibm.com>\0"
  "Subject\0Re: [PATCH 2/2] clone_with_pids: define the s390 syscall\0"
- "Date\0Mon, 15 Jun 2009 12:16:45 -0500\0"
- "To\0Linux Containers <containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org>\0"
- "Cc\0linux-s390-u79uwXL29TY76Z2rM5mHXA@public.gmane.org\0"
+ "Date\0Mon, 15 Jun 2009 17:16:45 +0000\0"
+ "To\0linux-s390@vger.kernel.org\0"
  "\00:1\0"
  "b\0"
  "Gah, sorry, git user error.  syscalls.S update was not in the patch.\n"
  "Here is an update:\n"
  "\n"
  "thanks,\n"
- "-serge\n"
- "\n"
- "From 788c5bcc14211608f187f36d327a9d6d87b19755 Mon Sep 17 00:00:00 2001\n"
- "From: Serge E. Hallyn <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>\n"
- "Date: Mon, 15 Jun 2009 12:14:11 -0400\n"
- "Subject: [PATCH 2/2] clone_with_pids: define the s390 syscall\n"
- "\n"
- "Hook up the clone_with_pids system call for s390x.  clone_with_pids()\n"
- "takes an additional argument over clone(), which we pass in through\n"
- "register 7.  Stub code for using the syscall looks like:\n"
- "\n"
- "struct target_pid_set {\n"
- "        int num_pids;\n"
- "        pid_t *target_pids;\n"
- "        unsigned long flags;\n"
- "};\n"
- "\n"
- "        register unsigned long int __r2 asm (\"2\") = (unsigned long int)(stack);\\\n"
- "        register unsigned long int __r3 asm (\"3\") = (unsigned long int)(flags);\\\n"
- "        register unsigned long int __r4 asm (\"4\") = (unsigned long int)(NULL); \\\n"
- "        register unsigned long int __r5 asm (\"5\") = (unsigned long int)(NULL); \\\n"
- "        register unsigned long int __r6 asm (\"6\") = (unsigned long int)(NULL); \\\n"
- "        register unsigned long int __r7 asm (\"7\") = (unsigned long int)(setp); \\\n"
- "        register unsigned long int __result asm (\"2\"); \\\n"
- "        __asm__ __volatile__( \\\n"
- "                \" lghi %%r1,332\\n\" \\\n"
- "                \" svc 0\\n\" \\\n"
- "                : \"=d\" (__result) \\\n"
- "                : \"0\" (__r2), \"d\" (__r3), \\\n"
- "                  \"d\" (__r4), \"d\" (__r5), \"d\" (__r6), \"d\" (__r7) \\\n"
- "                : \"1\", \"cc\", \"memory\" \\\n"
- "        ); \\\n"
- "                __result; \\\n"
- "        })\n"
- "\n"
- "        struct target_pid_set pid_set;\n"
- "        int pids[1] = { 19799 };\n"
- "        pid_set.num_pids = 1;\n"
- "        pid_set.target_pids = &pids[0];\n"
- "        pid_set.flags = 0;\n"
- "\n"
- "        rc = do_clone_with_pids(topstack, clone_flags, setp);\n"
- "\tif (rc == 0)\n"
- "\t\tprintf(\"Child\\n\");\n"
- "\telse if (rc > 0)\n"
- "\t\tprintf(\"Parent: child pid %d\\n\", rc);\n"
- "\telse\n"
- "\t\tprintf(\"Error %d\\n\", rc);\n"
- "\n"
- "Signed-off-by: Serge E. Hallyn <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>\n"
- "---\n"
- " arch/s390/include/asm/unistd.h    |    3 ++-\n"
- " arch/s390/kernel/compat_wrapper.S |   10 ++++++++++\n"
- " arch/s390/kernel/process.c        |   19 +++++++++++++++++++\n"
- " arch/s390/kernel/syscalls.S       |    1 +\n"
- " 4 files changed, 32 insertions(+), 1 deletions(-)\n"
- "\n"
- "diff --git a/arch/s390/include/asm/unistd.h b/arch/s390/include/asm/unistd.h\n"
- "index 3d22f17..d2facab 100644\n"
- "--- a/arch/s390/include/asm/unistd.h\n"
- "+++ b/arch/s390/include/asm/unistd.h\n"
- "@@ -269,7 +269,8 @@\n"
- " #define\t__NR_pwritev\t\t329\n"
- " #define __NR_checkpoint\t\t330\n"
- " #define __NR_restart\t\t331\n"
- "-#define NR_syscalls 332\n"
- "+#define __NR_clone_with_pids\t332\n"
- "+#define NR_syscalls 333\n"
- " \n"
- " /* \n"
- "  * There are some system calls that are not present on 64 bit, some\n"
- "diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S\n"
- "index c2228b2..bf13315 100644\n"
- "--- a/arch/s390/kernel/compat_wrapper.S\n"
- "+++ b/arch/s390/kernel/compat_wrapper.S\n"
- "@@ -1837,3 +1837,13 @@ sys_restore_wrapper:\n"
- " \tlgfr\t%r3,%r3\t\t\t# int\n"
- " \tllgfr\t%r4,%r4\t\t\t# unsigned long\n"
- " \tjg\tcompat_sys_restore\n"
- "+\n"
- "+\t.globl sys_clone_with_pids_wrapper\n"
- "+sys_clone_with_pids_wrapper:\n"
- "+\tllgfr\t%r2,%r2\t\t\t# unsigned long\n"
- "+\tllgfr\t%r3,%r3\t\t\t# unsigned long\n"
- "+\tllgtr\t%r4,%r4\t\t\t# int *\n"
- "+\tllgtr\t%r5,%r5\t\t\t# int *\n"
- "+\tllgtr\t%r6,%r6\t\t\t# void *\n"
- "+\tllgtr\t%r7,%r7\t\t\t# void *\n"
- "+\tjg\tcompat_sys_clone_with_pids\n"
- "diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c\n"
- "index a3acd8e..fa187bf 100644\n"
- "--- a/arch/s390/kernel/process.c\n"
- "+++ b/arch/s390/kernel/process.c\n"
- "@@ -246,6 +246,25 @@ SYSCALL_DEFINE0(clone)\n"
- " \t\t       parent_tidptr, child_tidptr);\n"
- " }\n"
- " \n"
- "+SYSCALL_DEFINE0(clone_with_pids)\n"
- "+{\n"
- "+\tstruct pt_regs *regs = task_pt_regs(current);\n"
- "+\tunsigned long clone_flags;\n"
- "+\tunsigned long newsp;\n"
- "+\tint __user *parent_tidptr, *child_tidptr;\n"
- "+\tvoid __user *upid_setp;\n"
- "+\n"
- "+\tclone_flags = regs->gprs[3];\n"
- "+\tnewsp = regs->orig_gpr2;\n"
- "+\tparent_tidptr = (int __user *) regs->gprs[4];\n"
- "+\tchild_tidptr = (int __user *) regs->gprs[5];\n"
- "+\tupid_setp = (void __user *) regs->gprs[7];\n"
- "+\tif (!newsp)\n"
- "+\t\tnewsp = regs->gprs[15];\n"
- "+\treturn do_fork_with_pids(clone_flags, newsp, regs, 0, parent_tidptr,\n"
- "+\t\t\tchild_tidptr, upid_setp);\n"
- "+}\n"
- "+\n"
- " /*\n"
- "  * This is trivial, and on the face of it looks like it\n"
- "  * could equally well be done in user mode.\n"
- "diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S\n"
- "index e755e93..1d638f5 100644\n"
- "--- a/arch/s390/kernel/syscalls.S\n"
- "+++ b/arch/s390/kernel/syscalls.S\n"
- "@@ -340,3 +340,4 @@ SYSCALL(sys_preadv,sys_preadv,compat_sys_preadv_wrapper)\n"
- " SYSCALL(sys_pwritev,sys_pwritev,compat_sys_pwritev_wrapper)\n"
- " SYSCALL(sys_checkpoint,sys_checkpoint,sys_checkpoint_wrapper) /* 330 */\n"
- " SYSCALL(sys_restart,sys_restart,sys_restore_wrapper)\n"
- "+SYSCALL(sys_clone_with_pids,sys_clone_with_pids,sys_clone_with_pids_wrapper)\n"
- "-- \n"
- 1.6.1
+ -serge
 
-c85fef7025397592f1efc422bbd526a40a355ff7145e552ee1aee88b4594beb4
+0f7905b94032250ed06c5d94281bfc63e0da9c7b9242b9cac9c765752b8b3fa0

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.