[CRIU] [PATCH 06/23] restorer: introduced the macro RT_SIGFRAME_UC to access the user context of a sigframe

Alexander Kartashov alekskartashov at parallels.com
Mon Jan 14 02:20:00 EST 2013


---
 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 449c198..d6349f4 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 2034fb5..73fa0ef 100644
--- a/pie/restorer.c
+++ b/pie/restorer.c
@@ -164,7 +164,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