Skip to content

Commit

Permalink
fixup! DONTMERGE Rework of PR 1857
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitrii Kuvaiskii <[email protected]>
  • Loading branch information
Dmitrii Kuvaiskii committed Jul 25, 2024
1 parent d6007cb commit 05b7adb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pal/src/host/linux-sgx/host_entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ async_exit_pointer:
# Inform that we are in AEX profiling code
movb $1, %gs:PAL_HOST_TCB_IN_AEX_PROF

subq $RED_ZONE_SIZE, %rsp
.cfi_adjust_cfa_offset RED_ZONE_SIZE
# FIXME: This second RSP adjustment is because Exitless re-uses the same stack to create
# RPC request objects, as the AEX flow here. It just so happens that the total size of
# allocated RPC request objects is less than 128B (red zone size), so I reuse this const.
# This double-stack-usage needs a proper fix.
subq $RED_ZONE_SIZE, %rsp
.cfi_adjust_cfa_offset RED_ZONE_SIZE

Expand Down Expand Up @@ -114,6 +120,9 @@ async_exit_pointer:
.cfi_adjust_cfa_offset -8
addq $RED_ZONE_SIZE, %rsp
.cfi_adjust_cfa_offset -RED_ZONE_SIZE
# FIXME: See above for explanation for this second RSP adjustment.
addq $RED_ZONE_SIZE, %rsp
.cfi_adjust_cfa_offset -RED_ZONE_SIZE

movb $0, %gs:PAL_HOST_TCB_IN_AEX_PROF
.cfi_endproc
Expand Down

0 comments on commit 05b7adb

Please sign in to comment.