Skip to content

Commit

Permalink
Update for lfi_ret restoring user sp
Browse files Browse the repository at this point in the history
  • Loading branch information
zyedidia committed Feb 6, 2025
1 parent 3b8e6cb commit f2ab9b0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion liblfi/pal/arch/arm64/runtime.S
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,11 @@ lfi_asm_ctx_exit:
lfi_ret:
GET_PROC
// restore kernel stack
ldr x22, [x21]
ldr x22, [REG_BASE]
mov sp, x22
// restore the user sp to its initial value
ldp x22, xzr, [sp], 16
str x22, [REG_BASE, PROC_REGS+16*15+8]
// restore callee-saved registers
ldp x29, x30, [sp], 16
ldp x27, x28, [sp], 16
Expand Down

0 comments on commit f2ab9b0

Please sign in to comment.