On 6/23/22 01:55, Song Gao wrote:
+static void setup_sigcontext(CPULoongArchState *env,
+ struct target_sigcontext *sc,
+ struct extctx_layout *extctx)
+{
+ int i;
+
+ if (extctx->flags & SC_USED_FP) {
+ __put_user(extctx->fpu.addr, &sc->sc_extcontext[0]);
+ } else {
+ __put_user(extctx->end.addr, &sc->sc_extcontext[0]);
+ }
This is incorrect. Where did this come from? It certainly doesn't appear in the kernel's
version of setup_sigcontext. The only reason the result works for you is that this is
overwritten by copy_fpu_to_sigframe within setup_sigframe.
r~