[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 11/15] linux-user/s390x: Add stub sigframe argument for last_b
From: |
Richard Henderson |
Subject: |
[PATCH v2 11/15] linux-user/s390x: Add stub sigframe argument for last_break |
Date: |
Wed, 28 Apr 2021 12:34:04 -0700 |
In order to properly present these arguments, we need to add
code to target/s390x to record LowCore parameters for user-only.
But in the meantime, at least zero the missing last_break
argument, and fixup the comment style in the vicinity.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
linux-user/s390x/signal.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/linux-user/s390x/signal.c b/linux-user/s390x/signal.c
index 17f617c655..bc41b01c5d 100644
--- a/linux-user/s390x/signal.c
+++ b/linux-user/s390x/signal.c
@@ -167,13 +167,16 @@ void setup_frame(int sig, struct target_sigaction *ka,
| (env->psw.mask & ~PSW_MASK_ASC);
env->psw.addr = ka->_sa_handler;
- env->regs[2] = sig; //map_signal(sig);
+ env->regs[2] = sig;
env->regs[3] = frame_addr += offsetof(typeof(*frame), sc);
- /* We forgot to include these in the sigcontext.
- To avoid breaking binary compatibility, they are passed as args. */
- env->regs[4] = 0; // FIXME: no clue... current->thread.trap_no;
- env->regs[5] = 0; // FIXME: no clue... current->thread.prot_addr;
+ /*
+ * We forgot to include these in the sigcontext.
+ * To avoid breaking binary compatibility, they are passed as args.
+ */
+ env->regs[4] = 0; /* FIXME: regs->int_code & 127 */
+ env->regs[5] = 0; /* FIXME: regs->int_parm_long */
+ env->regs[6] = 0; /* FIXME: current->thread.last_break */
/* Place signal number on stack to allow backtrace from handler. */
__put_user(env->regs[2], &frame->signo);
@@ -223,9 +226,10 @@ void setup_rt_frame(int sig, struct target_sigaction *ka,
| (env->psw.mask & ~PSW_MASK_ASC);
env->psw.addr = ka->_sa_handler;
- env->regs[2] = sig; //map_signal(sig);
+ env->regs[2] = sig;
env->regs[3] = frame_addr + offsetof(typeof(*frame), info);
env->regs[4] = frame_addr + offsetof(typeof(*frame), uc);
+ env->regs[5] = 0; /* FIXME: current->thread.last_break */
}
static void restore_sigregs(CPUS390XState *env, target_sigregs *sc)
--
2.25.1
- [PATCH v2 06/15] linux-user/s390x: Fix sigcontext sregs value, (continued)
- [PATCH v2 06/15] linux-user/s390x: Fix sigcontext sregs value, Richard Henderson, 2021/04/28
- [PATCH v2 07/15] linux-user/s390x: Use tswap_sigset in setup_rt_frame, Richard Henderson, 2021/04/28
- [PATCH v2 10/15] linux-user/s390x: Set psw.mask properly for the signal handler, Richard Henderson, 2021/04/28
- [PATCH v2 08/15] linux-user/s390x: Tidy save_sigregs, Richard Henderson, 2021/04/28
- [PATCH v2 09/15] linux-user/s390x: Clean up single-use gotos in signal.c, Richard Henderson, 2021/04/28
- [PATCH v2 11/15] linux-user/s390x: Add stub sigframe argument for last_break,
Richard Henderson <=
- [PATCH v2 12/15] linux-user/s390x: Fix frame_addr corruption in setup_frame, Richard Henderson, 2021/04/28
- [PATCH v2 13/15] linux-user/s390x: Add build asserts for sigset sizes, Richard Henderson, 2021/04/28
- [PATCH v2 14/15] linux-user/s390x: Clean up signal.c, Richard Henderson, 2021/04/28
- [PATCH v2 15/15] linux-user/s390x: Handle vector regs in signal stack, Richard Henderson, 2021/04/28
- Re: [PATCH v2 00/15] linux-user/s390x: some signal fixes, Richard Henderson, 2021/04/28