Skip to content

Commit

Permalink
switcher: NFC: .Lout_of_trusted_stack zero a1 with the others
Browse files Browse the repository at this point in the history
Co-authored-by: David Chisnall <[email protected]>
  • Loading branch information
nwf and davidchisnall committed Nov 4, 2024
1 parent 720570b commit 76d9f54
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sdk/core/switcher/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -427,11 +427,10 @@ __Z26compartment_switcher_entryz:
clc cra, SPILL_SLOT_pcc(csp)
clc cgp, SPILL_SLOT_cgp(csp)
cincoffset csp, csp, SPILL_SLOT_SIZE
// Set the return registers
// Set the first return register (a0) and zero the other (a1) below
li a0, -ENOTENOUGHTRUSTEDSTACK
li a1, 0
// Zero everything else
zeroAllRegistersExcept ra, sp, gp, s0, s1, a0, a1
zeroAllRegistersExcept ra, sp, gp, s0, s1, a0
cret

.size compartment_switcher_entry, . - compartment_switcher_entry
Expand Down

0 comments on commit 76d9f54

Please sign in to comment.