]> git.baikalelectronics.ru Git - kernel.git/commit
x86/entry: Remove UNTRAIN_RET from native_irq_return_ldt
authorAlexandre Chartre <alexandre.chartre@oracle.com>
Wed, 13 Jul 2022 19:58:08 +0000 (21:58 +0200)
committerBorislav Petkov <bp@suse.de>
Thu, 14 Jul 2022 07:45:12 +0000 (09:45 +0200)
commit3d41afd4c1ef62411d4be6c4c33cdfb7efcc714f
tree344c305d091ecbfeb36d9612c59ad442d3d4847a
parent6979a18f6d7075fcc4c3d74b58e3be74b21842d4
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@oracle.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/35b0d50f-12d1-10c3-f5e8-d6c140486d4a@oracle.com
arch/x86/entry/entry_64.S