[CRIU] [PATCH 20/24] parasite: transfer a pointer on sigframe to parasite

Andrey Vagin avagin at openvz.org
Wed May 22 16:08:21 EDT 2013


Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 include/parasite.h | 2 ++
 parasite-syscall.c | 1 +
 pie/parasite.c     | 4 ++++
 3 files changed, 7 insertions(+)

diff --git a/include/parasite.h b/include/parasite.h
index 4040034..cc5574f 100644
--- a/include/parasite.h
+++ b/include/parasite.h
@@ -73,6 +73,8 @@ struct parasite_init_args {
 	pid_t			real;
 
 	k_rtsigset_t		sig_blocked;
+
+	struct rt_sigframe	*sigframe;
 };
 
 struct parasite_log_args {
diff --git a/parasite-syscall.c b/parasite-syscall.c
index 0a4df22..32711c5 100644
--- a/parasite-syscall.c
+++ b/parasite-syscall.c
@@ -389,6 +389,7 @@ static int parasite_init(struct parasite_ctl *ctl, pid_t pid, int nr_threads)
 	args->p_addr_len = gen_parasite_saddr(&args->p_addr, pid);
 	args->nr_threads = nr_threads;
 	args->real = pid;
+	args->sigframe = ctl->threads[0].rsigframe;
 
 	if (sock == -1) {
 		int rst = -1;
diff --git a/pie/parasite.c b/pie/parasite.c
index 9333361..e2f70f8 100644
--- a/pie/parasite.c
+++ b/pie/parasite.c
@@ -27,6 +27,9 @@ static struct tid_state_s {
 
 	bool		use_sig_blocked;
 	k_rtsigset_t	sig_blocked;
+
+	struct rt_sigframe *sigframe;
+
 	void		*next;
 	unsigned char	stack[PARASITE_STACK_SIZE] __aligned(8);
 } *tid_state;
@@ -243,6 +246,7 @@ static int init_thread(struct parasite_init_args *args)
 
 	tid_state[next_tid_state].tid = sys_gettid();
 	tid_state[next_tid_state].real = args->real;
+	tid_state[next_tid_state].sigframe = args->sigframe;
 
 	futex_set(&tid_state[next_tid_state].cmd, PARASITE_CMD_IDLE);
 	futex_set(&tid_state[next_tid_state].ack, PARASITE_CMD_IDLE);
-- 
1.8.2



More information about the CRIU mailing list