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:
Wang Wensheng <wangwensheng4@huawei.com>
Reviewed-by:
Weilong Chen <chenweilong@huawei.com>
Reviewed-by:
Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
Loading
Please sign in to comment