sharepool: Fix ASLR broken
ascend inclusion
category: bugfix
bugzilla: NA
CVE: NA
---------------------------
To avoid mmap vspace reserved for sharepool, we currently change the
high_limit to MMAP_SHARE_POOL_START in arch_get_unmapped_area() and
arch_get_unmapped_area_topdown(). In mmap-topdown scene, this make the
start address of mmap being always MMAP_SHARE_POOL_START. ASLR got
broken.
To fix this, this patch set the mm->mmap_base based on
MMAP_SHARE_POOL_START instead of STACK_TOP in topdown scene.
Fixes: 4bdd5c21793e ("ascend: memory: introduce do_mm_populate and hugetlb_insert_hugepage")
Signed-off-by: NWang Wensheng <wangwensheng4@huawei.com>
Reviewed-by: NWeilong Chen <chenweilong@huawei.com>
Reviewed-by: NDing Tianhong <dingtianhong@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Showing
想要评论请 注册 或 登录