2019-10-23 17:06:20

by Thomas Gleixner

[permalink] [raw]
Subject: [patch V2 02/17] x86/entry/64: Remove pointless jump in paranoid_exit

Jump directly to restore_regs_and_return_to_kernel instead of making
a pointless extra jump through .Lparanoid_exit_restore

Signed-off-by: Thomas Gleixner <[email protected]>
---
arch/x86/entry/entry_64.S | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

--- a/arch/x86/entry/entry_64.S
+++ b/arch/x86/entry/entry_64.S
@@ -1272,12 +1272,11 @@ ENTRY(paranoid_exit)
/* Always restore stashed CR3 value (see paranoid_entry) */
RESTORE_CR3 scratch_reg=%rbx save_reg=%r14
SWAPGS_UNSAFE_STACK
- jmp .Lparanoid_exit_restore
+ jmp restore_regs_and_return_to_kernel
.Lparanoid_exit_no_swapgs:
TRACE_IRQS_IRETQ_DEBUG
/* Always restore stashed CR3 value (see paranoid_entry) */
RESTORE_CR3 scratch_reg=%rbx save_reg=%r14
-.Lparanoid_exit_restore:
jmp restore_regs_and_return_to_kernel
END(paranoid_exit)




2019-10-23 20:18:40

by Sean Christopherson

[permalink] [raw]
Subject: Re: [patch V2 02/17] x86/entry/64: Remove pointless jump in paranoid_exit

On Wed, Oct 23, 2019 at 02:27:07PM +0200, Thomas Gleixner wrote:
> Jump directly to restore_regs_and_return_to_kernel instead of making
> a pointless extra jump through .Lparanoid_exit_restore
>
> Signed-off-by: Thomas Gleixner <[email protected]>
> ---

Reviewed-by: Sean Christopherson <[email protected]>

2019-11-06 15:32:50

by Alexandre Chartre

[permalink] [raw]
Subject: Re: [patch V2 02/17] x86/entry/64: Remove pointless jump in paranoid_exit


On 10/23/19 2:27 PM, Thomas Gleixner wrote:
> Jump directly to restore_regs_and_return_to_kernel instead of making
> a pointless extra jump through .Lparanoid_exit_restore
>
> Signed-off-by: Thomas Gleixner <[email protected]>
> ---
> arch/x86/entry/entry_64.S | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>

Reviewed-by: Alexandre Chartre <[email protected]>

alex.

Subject: [tip: x86/asm] x86/entry/64: Remove pointless jump in paranoid_exit

The following commit has been merged into the x86/asm branch of tip:

Commit-ID: 45c08383141794a7e9b26f35d491b74f33ac469e
Gitweb: https://git.kernel.org/tip/45c08383141794a7e9b26f35d491b74f33ac469e
Author: Thomas Gleixner <[email protected]>
AuthorDate: Wed, 23 Oct 2019 14:27:07 +02:00
Committer: Thomas Gleixner <[email protected]>
CommitterDate: Sat, 16 Nov 2019 12:55:55 +01:00

x86/entry/64: Remove pointless jump in paranoid_exit

Jump directly to restore_regs_and_return_to_kernel instead of making
a pointless extra jump through .Lparanoid_exit_restore

Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Sean Christopherson <[email protected]>
Reviewed-by: Alexandre Chartre <[email protected]>
Acked-by: Peter Zijlstra (Intel) <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]

---
arch/x86/entry/entry_64.S | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S
index d58c012..76942cb 100644
--- a/arch/x86/entry/entry_64.S
+++ b/arch/x86/entry/entry_64.S
@@ -1273,12 +1273,11 @@ SYM_CODE_START_LOCAL(paranoid_exit)
/* Always restore stashed CR3 value (see paranoid_entry) */
RESTORE_CR3 scratch_reg=%rbx save_reg=%r14
SWAPGS_UNSAFE_STACK
- jmp .Lparanoid_exit_restore
+ jmp restore_regs_and_return_to_kernel
.Lparanoid_exit_no_swapgs:
TRACE_IRQS_IRETQ_DEBUG
/* Always restore stashed CR3 value (see paranoid_entry) */
RESTORE_CR3 scratch_reg=%rbx save_reg=%r14
-.Lparanoid_exit_restore:
jmp restore_regs_and_return_to_kernel
SYM_CODE_END(paranoid_exit)