[CRIU] [PATCH 21/44] restorer: introduced the macro SIGFRAME_OFFSET.
Alexander Kartashov
alekskartashov at parallels.com
Mon Jan 7 10:04:50 EST 2013
The macro is designated to tune the beginning of a sigframe on different architectures.
Signed-off-by: Alexander Kartashov <alekskartashov at parallels.com>
---
arch/x86/include/asm/restorer.h | 2 ++
pie/restorer.c | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/restorer.h b/arch/x86/include/asm/restorer.h
index e774fbb..a17201c 100644
--- a/arch/x86/include/asm/restorer.h
+++ b/arch/x86/include/asm/restorer.h
@@ -131,6 +131,8 @@ struct rt_sigframe {
#define RT_SIGFRAME_UC(rt_sigframe) rt_sigframe->uc
+#define SIGFRAME_OFFSET 8
+
int restore_gpregs(struct rt_sigframe *f, UserX86RegsEntry *r);
diff --git a/pie/restorer.c b/pie/restorer.c
index 94aec64..e3bbde1 100644
--- a/pie/restorer.c
+++ b/pie/restorer.c
@@ -197,7 +197,7 @@ long __export_restore_thread(struct thread_restore_args *args)
futex_dec_and_wake(&thread_inprogress);
- new_sp = (long)rt_sigframe + 8;
+ new_sp = (long)rt_sigframe + SIGFRAME_OFFSET;
ARCH_RT_SIGRETURN(new_sp);
core_restore_end:
@@ -691,7 +691,7 @@ long __export_restore_task(struct task_restore_core_args *args)
/*
* Sigframe stack.
*/
- new_sp = (long)rt_sigframe + 8;
+ new_sp = (long)rt_sigframe + SIGFRAME_OFFSET;
/*
* Prepare the stack and call for sigreturn,
--
1.7.10.4
More information about the CRIU
mailing list