Commit d147553b authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Borislav Petkov

x86/xen: Add UNTRAIN_RET

Ensure the Xen entry also passes through UNTRAIN_RET.
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Reviewed-by: default avatarJosh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
parent b75b7f8e
...@@ -328,6 +328,12 @@ SYM_CODE_END(ret_from_fork) ...@@ -328,6 +328,12 @@ SYM_CODE_END(ret_from_fork)
#endif #endif
.endm .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 * idtentry_body - Macro to emit code calling the C function
* @cfunc: C function to be called * @cfunc: C function to be called
...@@ -347,7 +353,7 @@ SYM_CODE_END(ret_from_fork) ...@@ -347,7 +353,7 @@ SYM_CODE_END(ret_from_fork)
* switch the CR3. So it can skip invoking error_entry(). * switch the CR3. So it can skip invoking error_entry().
*/ */
ALTERNATIVE "call error_entry; movq %rax, %rsp", \ ALTERNATIVE "call error_entry; movq %rax, %rsp", \
"", X86_FEATURE_XENPV "call xen_error_entry", X86_FEATURE_XENPV
ENCODE_FRAME_POINTER ENCODE_FRAME_POINTER
UNWIND_HINT_REGS UNWIND_HINT_REGS
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment