[CRIU] [PATCH 4/6] Replace PAGE_SIZE in prepare_restorer_blob

Christopher Covington cov at codeaurora.org
Mon Oct 6 11:50:16 PDT 2014


This fixes the following error for AArch64 kernels with
CONFIG_ARM64_64K_PAGES=y.

Error (cr-restore.c:2695): Can't mmap section for restore code

Signed-off-by: Christopher Covington <cov at codeaurora.org>
---
 cr-restore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cr-restore.c b/cr-restore.c
index 7c597b3..ac02ef8 100644
--- a/cr-restore.c
+++ b/cr-restore.c
@@ -2273,7 +2273,7 @@ static int prepare_restorer_blob(void)
 	 * in turn will lead to set-exe-file prctl to fail with EBUSY.
 	 */
 
-	restorer_len = round_up(sizeof(restorer_blob), PAGE_SIZE);
+	restorer_len = page_align(sizeof(restorer_blob));
 	restorer = mmap(NULL, restorer_len,
 			PROT_READ | PROT_WRITE | PROT_EXEC,
 			MAP_PRIVATE | MAP_ANON, 0, 0);
-- 
Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by the Linux Foundation.



More information about the CRIU mailing list