[CRIU] [PATCH 3/4] restorer: Update RESTORE_ALIGN_STACK for arm64
Vijaya Kumar K
Vijaya.Kumar at caviumnetworks.com
Mon Dec 28 00:09:41 PST 2015
arm64 requires stack to be aligned to 16 bytes.
update RESTORE_ALIGN_STACK macro to always align
to 16 bytes.
Signed-off-by: Vijaya Kumar K <vijayak at caviumnetworks.com>
---
include/restorer.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/include/restorer.h b/include/restorer.h
index 74be81d..fc2b1d2 100644
--- a/include/restorer.h
+++ b/include/restorer.h
@@ -50,7 +50,7 @@ struct restore_mem_zone {
u8 redzone[RESTORE_STACK_REDZONE];
u8 stack[RESTORE_STACK_SIZE];
u8 rt_sigframe[RESTORE_STACK_SIGFRAME];
-} __aligned(sizeof(long));
+} __aligned(16);
struct rst_sched_param {
int policy;
@@ -182,8 +182,12 @@ struct task_restore_args {
void **breakpoint;
} __aligned(64);
+/*
+ * For arm64 stack needs to aligned to 16 bytes.
+ * Hence align to 16 bytes for all
+*/
#define RESTORE_ALIGN_STACK(start, size) \
- (ALIGN((start) + (size) - sizeof(long), sizeof(long)))
+ (ALIGN((start) + (size) - 16, 16))
static inline unsigned long restorer_stack(struct thread_restore_args *a)
{
--
1.7.9.5
More information about the CRIU
mailing list