[CRIU] [PATCH 2/6] AArch64: Remove TASK_SIZE from mmap_seized
Christopher Covington
cov at codeaurora.org
Mon Oct 6 11:50:14 PDT 2014
TASK_SIZE for AArch64 may be any of several options between (1 << 39)
and (1 << 48), inclusive, depending on kernel configuration. Go back
to just checking the most significant bit, as was done before commit
3f12d688ae563b91d8a738d68902ea2e23f2b59c was made to accomodate 32-bit
ARM (before mmap_seized got architecture-specific implementations).
This fixes the following error for AArch64 kernels with
CONFIG_ARM64_64K_PAGES=y.
Error (parasite-syscall.c:1105): Can't allocate memory for parasite blob (pid: 104)
Signed-off-by: Christopher Covington <cov at codeaurora.org>
---
arch/aarch64/crtools.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/aarch64/crtools.c b/arch/aarch64/crtools.c
index 18224b0..13668cd 100644
--- a/arch/aarch64/crtools.c
+++ b/arch/aarch64/crtools.c
@@ -211,7 +211,7 @@ void *mmap_seized(
err = syscall_seized(ctl, __NR_mmap, &map,
(unsigned long)addr, length, prot, flags, fd, offset);
- if (err < 0 || map > TASK_SIZE)
+ if (err < 0 || (long)map < 0)
map = 0;
return (void *)map;
--
Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by the Linux Foundation.
More information about the CRIU
mailing list