Skip to content

Commit

Permalink
x86/xen: Fix initialisation in hypercall_page after rethunk
Browse files Browse the repository at this point in the history
The hypercall_page is special and the RETs there should not be changed
into rethunk calls (but can have SLS mitigation).  Change the initial
instructions to ret + int3 padding, as was done in upstream commit
5b2fc51 "x86/ibt,xen: Sprinkle the ENDBR".

Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
bwhacks authored and gregkh committed Jul 23, 2022
1 parent 86ccf19 commit 96907c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/x86/xen/xen-head.S
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ SYM_CODE_END(asm_cpu_bringup_and_idle)
SYM_CODE_START(hypercall_page)
.rept (PAGE_SIZE / 32)
UNWIND_HINT_FUNC
.skip 31, 0x90
ANNOTATE_UNRET_SAFE
RET
ret
.skip 31, 0xcc
.endr

#define HYPERCALL(n) \
Expand Down

0 comments on commit 96907c5

Please sign in to comment.