mret
The instruction that ends a RISC-V machine-mode trap handler and undoes everything the trap changed.
In a single step, mret jumps to the address in mepc, switches to the privilege level saved in mstatus.MPP and restores the MIE interrupt-enable bit from MPIE. MPP is then set to the lowest level the core supports, so a stray second mret can't promote anyone to machine mode.
It also gets used in a way that looks backwards: to drop privilege for the first time. Firmware that wants to start a task in U-mode writes the entry point into mepc, sets MPP to U and executes mret — returning from a trap that never happened. The lower-level equivalents are sret and, in early drafts of the spec, uret.