[CRIU] [PATCH 20/44] restorer: introduced the macro RT_SIGFRAME_UC to access the user context of a sigframe.

Alexander Kartashov alekskartashov at parallels.com
Mon Jan 7 10:04:49 EST 2013


Signed-off-by: Alexander Kartashov <alekskartashov at parallels.com>
---
 arch/x86/include/asm/restorer.h |    2 ++
 pie/restorer.c                  |    2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/restorer.h b/arch/x86/include/asm/restorer.h
index 46e7edf..e774fbb 100644
--- a/arch/x86/include/asm/restorer.h
+++ b/arch/x86/include/asm/restorer.h
@@ -129,6 +129,8 @@ struct rt_sigframe {
 		     : "r"(ret)					\
 		     : "memory")
 
+#define RT_SIGFRAME_UC(rt_sigframe) rt_sigframe->uc
+
 
 int restore_gpregs(struct rt_sigframe *f, UserX86RegsEntry *r);
 
diff --git a/pie/restorer.c b/pie/restorer.c
index 04e7ab5..94aec64 100644
--- a/pie/restorer.c
+++ b/pie/restorer.c
@@ -156,7 +156,7 @@ static int restore_thread_common(struct rt_sigframe *sigframe,
 	}
 
 	if (args->has_blk_sigset)
-		sigframe->uc.uc_sigmask.sig[0] = args->blk_sigset;
+		RT_SIGFRAME_UC(sigframe).uc_sigmask.sig[0] = args->blk_sigset;
 
 	restore_sched_info(&args->sp);
 	if (restore_fpu(sigframe, args))
-- 
1.7.10.4



More information about the CRIU mailing list