commit d147553b64 upstream.

Ensure the Xen entry also passes through UNTRAIN_RET.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Peter Zijlstra 2022-06-14 23:16:01 +02:00 коммит произвёл Greg Kroah-Hartman
Родитель 87e6270183
Коммит 8894f699f1
1 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -320,6 +320,12 @@ SYM_CODE_END(ret_from_fork)
#endif
.endm
SYM_CODE_START_LOCAL(xen_error_entry)
UNWIND_HINT_FUNC
UNTRAIN_RET
RET
SYM_CODE_END(xen_error_entry)
/**
* idtentry_body - Macro to emit code calling the C function
* @cfunc: C function to be called
@ -339,7 +345,7 @@ SYM_CODE_END(ret_from_fork)
* switch the CR3. So it can skip invoking error_entry().
*/
ALTERNATIVE "call error_entry; movq %rax, %rsp", \
"", X86_FEATURE_XENPV
"call xen_error_entry", X86_FEATURE_XENPV
ENCODE_FRAME_POINTER
UNWIND_HINT_REGS