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 19, 2024
1 parent 6153cba commit 296eca6
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 @@ -414,11 +414,10 @@ switcher_after_compartment_call:
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 296eca6

Please sign in to comment.