[CRIU] [PATCH] ptrace: add ability to get clear_tid_address
Andrew Vagin
avagin at openvz.org
Thu Feb 2 05:08:44 EST 2012
We need this address for dumping and restoring processes.
Signe-off-by: Andrew Vagin <avagin at openvz.org>
---
include/linux/ptrace.h | 1 +
kernel/ptrace.c | 3 +++
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h
index c2f1f6a..28fadfa 100644
--- a/include/linux/ptrace.h
+++ b/include/linux/ptrace.h
@@ -50,6 +50,7 @@
#define PTRACE_SEIZE 0x4206
#define PTRACE_INTERRUPT 0x4207
#define PTRACE_LISTEN 0x4208
+#define PTRACE_GET_TID_ADDRESS 0x4209
/* flags in @data for PTRACE_SEIZE */
#define PTRACE_SEIZE_DEVEL 0x80000000 /* temp flag for development */
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index 00ab2ca..ed7fbe7 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -845,6 +845,9 @@ int ptrace_request(struct task_struct *child, long request,
break;
}
#endif
+ case PTRACE_GET_TID_ADDRESS:
+ return put_user(child->clear_child_tid, (int __user **) data);
+
default:
break;
}
--
1.7.1
More information about the CRIU
mailing list