提交 97cb3288 编写于 作者: C Chen Jiahao 提交者: Zheng Zengkai

arm64: fix USER_DS definition problem in non-compat mode

hulk inclusion
category: bugfix
bugzilla: 51788
CVE: NA

--------

For some platforms which CONFIG_COMPAT is not set, the function 'is_compat_task'
is not declared. Therefore, the macro USER_DS cannot be defined using the function
'is_compat_task' in this case.

Fixes: 2ef73d5148e3 ("arm64: fix current_thread_info()->addr_limit setup")
Signed-off-by: NChen Jiahao <chenjiahao16@huawei.com>
Reviewed-by: NChang Liao <liaochang1@huawei.com>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 19b676ce
......@@ -9,8 +9,12 @@
#define __ASM_PROCESSOR_H
#define KERNEL_DS UL(-1)
#ifdef CONFIG_COMPAT
#define USER_DS (is_compat_task() ? \
(UL(0x100000000) - 1) : (TASK_SIZE - 1))
#else
#define USER_DS (TASK_SIZE - 1)
#endif
/*
* On arm64 systems, unaligned accesses by the CPU are cheap, and so there is
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册