Commit cb478b93 authored by Zhen Lei's avatar Zhen Lei Committed by Zheng Zengkai
Browse files

arm64: replace is_compat_task() with is_ilp32_compat_task() in TASK_SIZE_MAX

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I4V6F8


CVE: NA

-------------------------------------------------------------------------

access_ok() is used to preliminarily check 'uaddr' to avoid unnecessary
page fault caused by invalid input. The page fault will do the accurate
address verification based on task's mm. It's also used to do a check on
the get_fs(), see the comments of __access_ok().

But now the support for get_fs() on arm64 has been deleted by commit
edf84200 ("arm64: uaccess: remove set_fs()"). So access_ok()
does not need to perform such strict checks for compat tasks.

Remove the is_compact_task() check can improve the performance of
syscalls. For example, all test items of libMicro can be improved by
4.89% on average.

The next patch will avoid calling is_ilp32_compat_task() by default by
close its build option, because ILP32 has specific requirements.

Signed-off-by: default avatarZhen Lei <thunder.leizhen@huawei.com>
Reviewed-by: default avatarCheng Jian <cj.chengjian@huawei.com>
Reviewed-by: default avatarliuchao (CR) <liuchao173@huawei.com>
Reviewed-by: Liu Chao (CR) < liuchao173@huawei.com >
Reviewed-by: default avatarXiongfeng Wang <wangxiongfeng2@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 0f71a888
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment