Commit f3afc1da authored by Christopher Covington's avatar Christopher Covington Committed by Pavel Emelyanov

AArch64: Remove TASK_SIZE from mmap_seized

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
3f12d688 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: 's avatarChristopher Covington <cov@codeaurora.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 9391034f
...@@ -211,7 +211,7 @@ void *mmap_seized( ...@@ -211,7 +211,7 @@ void *mmap_seized(
err = syscall_seized(ctl, __NR_mmap, &map, err = syscall_seized(ctl, __NR_mmap, &map,
(unsigned long)addr, length, prot, flags, fd, offset); (unsigned long)addr, length, prot, flags, fd, offset);
if (err < 0 || map > TASK_SIZE) if (err < 0 || (long)map < 0)
map = 0; map = 0;
return (void *)map; return (void *)map;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment