提交 4ce6f485 编写于 作者: X Xiongfeng Wang 提交者: Zheng Zengkai

arm64: fix abi change caused by ILP32

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I4KCU2
CVE: NA

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

One of the ILP32 patchset rename 'compat_user_mode' and
'compat_thumb_mode' to 'a32_user_mode' and 'a32_user_mode'. But these
two macros are used in some opensource userspace application. To keep
compatibility, we redefine these two macros.

Fixes: 23b2f00 ("arm64: rename functions that reference compat term")
Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com>
Reviewed-by: NHanjun Guo <guohanjun@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com>
Reviewed-by: Nliwei <liwei391@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 08f90903
......@@ -220,6 +220,8 @@ static inline void forget_syscall(struct pt_regs *regs)
#define a32_thumb_mode(regs) (0)
#endif
#define compat_thumb_mode(regs) a32_thumb_mode(regs)
#define user_mode(regs) \
(((regs)->pstate & PSR_MODE_MASK) == PSR_MODE_EL0t)
......@@ -227,6 +229,8 @@ static inline void forget_syscall(struct pt_regs *regs)
(((regs)->pstate & (PSR_MODE32_BIT | PSR_MODE_MASK)) == \
(PSR_MODE32_BIT | PSR_MODE_EL0t))
#define compat_user_mode(regs) a32_user_mode(regs)
#define processor_mode(regs) \
((regs)->pstate & PSR_MODE_MASK)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册