[PATCH OLK-6.6] arm64: xcall: Fix GPR touch as the original step

hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/ICG4XI -------------------------------- Kernel_{entry, exit} fast mode should only skip some alternative step but not any register. Fix it directly, moves all register touch outside fast mode. Fixes: cf5f2d9ff017 ("arm64: Faster SVC exception handler with xcall") Signed-off-by: Yipeng Zou <zouyipeng@huawei.com> --- arch/arm64/kernel/entry.S | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S index bd43e39d35c0..117be8a7d529 100644 --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S @@ -238,14 +238,14 @@ alternative_cb_end * Ensure MDSCR_EL1.SS is clear, since we can unmask debug exceptions * when scheduling. */ - .if \fast_mode == std ldr x19, [tsk, #TSK_TI_FLAGS] + .if \fast_mode == std disable_step_tsk x19, x20 .endif /* Check for asynchronous tag check faults in user space */ - .if \fast_mode == std ldr x0, [tsk, THREAD_SCTLR_USER] + .if \fast_mode == std check_mte_async_tcf x22, x23, x0 .endif @@ -288,11 +288,11 @@ alternative_if ARM64_MTE isb b 1f alternative_else_nop_endif + .endif alternative_if ARM64_HAS_ADDRESS_AUTH isb alternative_else_nop_endif 1: - .endif scs_load_current .else @@ -409,8 +409,8 @@ alternative_else_nop_endif scs_save tsk /* Ignore asynchronous tag check faults in the uaccess routines */ - .if \fast_mode == std ldr x0, [tsk, THREAD_SCTLR_USER] + .if \fast_mode == std clear_mte_async_tcf x0 .endif -- 2.34.1

反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/16748 邮件列表地址:https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/V4O... FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/16748 Mailing list address: https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/V4O...
participants (2)
-
patchwork bot
-
Yipeng Zou