struct compat_sigcontext { struct compat_user_regs_struct sc_regs; union __riscv_fp_state sc_fpregs;
};
struct compat_ucontext {
compat_ulong_t uc_flags; struct compat_ucontext *uc_link;
compat_stack_t uc_stack;
sigset_t uc_sigmask; /* There's some padding here to allow sigset_t to be expanded in the *future.Thoughthisisunlikely,otherarchitecturesputuc_sigmask *attheendofthisstructureandexplicitlystateitcanbe
* expanded, so we didn't want to box ourselves in here. */
__u8 __unused[1024 / 8 - sizeof(sigset_t)]; /* We can't put uc_sigmask at the end of this structure because we need *tobeabletoexpandsigcontextinthefuture.Forexample,the *vectorISAextensionwillalmostcertainlyaddISAstate.Wewant *toensurealluser-visibleISAstatecanbesavedandrestoredviaa *ucontext,sowe'reputtingthisattheendinordertoallowfor *infiniteextensibility.Sinceweknowthiswillbeextendedandwe *assumesigset_twon'tbeextendedanextremeamount,we're
* prioritizing this. */ struct compat_sigcontext uc_mcontext;
};
/* We support no other extension state at this time. */ for (i = 0; i < ARRAY_SIZE(sc_fpregs->q.reserved); i++) {
err = __put_user(0, &sc_fpregs->q.reserved[i]); if (unlikely(err)) break;
}
/* sc_regs is structured the same as the start of pt_regs */
err = __copy_to_user(&sc->sc_regs, &cregs, sizeof(sc->sc_regs)); /* Save the floating-point state. */ if (has_fpu())
err |= compat_save_fp_state(regs, &sc->sc_fpregs); return err;
}
staticinlinevoid __user *compat_get_sigframe(struct ksignal *ksig, struct pt_regs *regs, size_t framesize)
{ unsignedlong sp; /* Default to using normal stack */
sp = regs->sp;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.