[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <165779691151.15455.14072147760711822581.tip-bot2@tip-bot2>
Date: Thu, 14 Jul 2022 11:08:31 -0000
From: "tip-bot2 for Alexandre Chartre" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Alexandre Chartre <alexandre.chartre@...cle.com>,
Borislav Petkov <bp@...e.de>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: x86/urgent] x86/entry: Remove UNTRAIN_RET from native_irq_return_ldt
The following commit has been merged into the x86/urgent branch of tip:
Commit-ID: d16e0b26672066035439b2f49887f6576c4a3689
Gitweb: https://git.kernel.org/tip/d16e0b26672066035439b2f49887f6576c4a3689
Author: Alexandre Chartre <alexandre.chartre@...cle.com>
AuthorDate: Wed, 13 Jul 2022 21:58:08 +02:00
Committer: Borislav Petkov <bp@...e.de>
CommitterDate: Thu, 14 Jul 2022 09:45:12 +02:00
x86/entry: Remove UNTRAIN_RET from native_irq_return_ldt
UNTRAIN_RET is not needed in native_irq_return_ldt because RET
untraining has already been done at this point.
In addition, when the RETBleed mitigation is IBPB, UNTRAIN_RET clobbers
several registers (AX, CX, DX) so here it trashes user values which are
in these registers.
Signed-off-by: Alexandre Chartre <alexandre.chartre@...cle.com>
Signed-off-by: Borislav Petkov <bp@...e.de>
Link: https://lore.kernel.org/r/35b0d50f-12d1-10c3-f5e8-d6c140486d4a@oracle.com
---
arch/x86/entry/entry_64.S | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S
index 285e043..9953d96 100644
--- a/arch/x86/entry/entry_64.S
+++ b/arch/x86/entry/entry_64.S
@@ -727,7 +727,6 @@ native_irq_return_ldt:
pushq %rdi /* Stash user RDI */
swapgs /* to kernel GS */
SWITCH_TO_KERNEL_CR3 scratch_reg=%rdi /* to kernel CR3 */
- UNTRAIN_RET
movq PER_CPU_VAR(espfix_waddr), %rdi
movq %rax, (0*8)(%rdi) /* user RAX */
Powered by blists - more mailing lists