From 1a5296e537fccd75228c2c7c5c20871131f4d2e7 Mon Sep 17 00:00:00 2001 From: Vijaya Kumar K Date: Mon, 28 Dec 2015 13:39:40 +0530 Subject: [PATCH] restore: Align stack to 16 bytes for arm64 arm64 expects stack to be aligned to 16 bytes. If stack pointer is not aligned clone system call fails during restore. Signed-off-by: Vijaya Kumar K Signed-off-by: Pavel Emelyanov --- cr-check.c | 2 +- cr-restore.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cr-check.c b/cr-check.c index b955cc04b..ee3556893 100644 --- a/cr-check.c +++ b/cr-check.c @@ -808,7 +808,7 @@ struct clone_arg { * Reserve some space for clone() to locate arguments * and retcode in this place */ - char stack[128] __attribute__((aligned (8))); + char stack[128] __attribute__((aligned (16))); char stack_ptr[0]; }; diff --git a/cr-restore.c b/cr-restore.c index db55b977c..e12207f75 100644 --- a/cr-restore.c +++ b/cr-restore.c @@ -1075,7 +1075,7 @@ struct cr_clone_arg { * Reserve some space for clone() to locate arguments * and retcode in this place */ - char stack[128] __attribute__((aligned (8))); + char stack[128] __attribute__((aligned (16))); char stack_ptr[0]; struct pstree_item *item; unsigned long clone_flags;