Commit c6c8f37f authored by Wang Wensheng's avatar Wang Wensheng Committed by Yang Yingliang
Browse files

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: default avatarWang Wensheng <wangwensheng4@huawei.com>
Reviewed-by: default avatarWeilong Chen <chenweilong@huawei.com>
Reviewed-by: default avatarDing Tianhong <dingtianhong@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 199e283b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment