Commit 97cb3288 authored by Chen Jiahao's avatar Chen Jiahao Committed by Zheng Zengkai
Browse files

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: default avatarChen Jiahao <chenjiahao16@huawei.com>
Reviewed-by: default avatarChang Liao <liaochang1@huawei.com>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 19b676ce
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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