[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 24/37] linux-user/hppa: Fix setup_sigcontext()
From: |
Laurent Vivier |
Subject: |
[PULL 24/37] linux-user/hppa: Fix setup_sigcontext() |
Date: |
Wed, 28 Sep 2022 22:27:24 +0200 |
From: Helge Deller <deller@gmx.de>
We don't emulate a preemptive kernel on this level, and the hppa architecture
doesn't allow context switches on the gateway page. So we always have to return
to sc_iaoq[] and not to gr[31].
This fixes the remaining random segfaults which still occured.
Signed-off-by: Helge Deller <deller@gmx.de>
Message-Id: <20220924114501.21767-8-deller@gmx.de>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
linux-user/hppa/signal.c | 16 +++-------------
1 file changed, 3 insertions(+), 13 deletions(-)
diff --git a/linux-user/hppa/signal.c b/linux-user/hppa/signal.c
index 396e310dc92d..f253a1586461 100644
--- a/linux-user/hppa/signal.c
+++ b/linux-user/hppa/signal.c
@@ -49,23 +49,13 @@ struct target_rt_sigframe {
static void setup_sigcontext(struct target_sigcontext *sc, CPUArchState *env)
{
- int flags = 0;
int i;
- /* ??? if on_sig_stack, flags |= 1 (PARISC_SC_FLAG_ONSTACK). */
-
- if (env->iaoq_f < TARGET_PAGE_SIZE) {
- /* In the gateway page, executing a syscall. */
- flags |= 2; /* PARISC_SC_FLAG_IN_SYSCALL */
- __put_user(env->gr[31], &sc->sc_iaoq[0]);
- __put_user(env->gr[31] + 4, &sc->sc_iaoq[1]);
- } else {
- __put_user(env->iaoq_f, &sc->sc_iaoq[0]);
- __put_user(env->iaoq_b, &sc->sc_iaoq[1]);
- }
+ __put_user(env->iaoq_f, &sc->sc_iaoq[0]);
+ __put_user(env->iaoq_b, &sc->sc_iaoq[1]);
__put_user(0, &sc->sc_iasq[0]);
__put_user(0, &sc->sc_iasq[1]);
- __put_user(flags, &sc->sc_flags);
+ __put_user(0, &sc->sc_flags);
__put_user(cpu_hppa_get_psw(env), &sc->sc_gr[0]);
for (i = 1; i < 32; ++i) {
--
2.37.3
- [PULL 14/37] linux-user: Fix madvise(MADV_DONTNEED) on alpha, (continued)
- [PULL 14/37] linux-user: Fix madvise(MADV_DONTNEED) on alpha, Laurent Vivier, 2022/09/28
- [PULL 18/37] linux-user: Fix TARGET_PROT_SEM for XTENSA, Laurent Vivier, 2022/09/28
- [PULL 13/37] linux-user: Provide MADV_* definitions, Laurent Vivier, 2022/09/28
- [PULL 15/37] linux-user: Implement stracing madvise(), Laurent Vivier, 2022/09/28
- [PULL 21/37] linux-user/hppa: Drop stack guard page on hppa target, Laurent Vivier, 2022/09/28
- [PULL 20/37] linux-user/hppa: Add signal trampoline for hppa target, Laurent Vivier, 2022/09/28
- [PULL 16/37] linux-user: Passthrough MADV_DONTNEED for certain file mappings, Laurent Vivier, 2022/09/28
- [PULL 17/37] tests/tcg/linux-test: Add linux-madvise test, Laurent Vivier, 2022/09/28
- [PULL 23/37] linux-user/hppa: Allow PROT_GROWSUP and PROT_GROWSDOWN in mprotect(), Laurent Vivier, 2022/09/28
- [PULL 22/37] linux-user/hppa: Increase guest stack size to 80MB for hppa target, Laurent Vivier, 2022/09/28
- [PULL 24/37] linux-user/hppa: Fix setup_sigcontext(),
Laurent Vivier <=
- [PULL 26/37] linux-user: Don't assume 0 is not a valid host timer_t value, Laurent Vivier, 2022/09/28
- [PULL 30/37] linux-user: Combine do_futex and do_futex_time64, Laurent Vivier, 2022/09/28
- [PULL 27/37] linux-user/s390x: Save/restore fpc when handling a signal, Laurent Vivier, 2022/09/28
- [PULL 32/37] linux-user: Implement FUTEX_WAKE_BITSET, Laurent Vivier, 2022/09/28
- [PULL 33/37] linux-user: Convert signal number for FUTEX_FD, Laurent Vivier, 2022/09/28
- [PULL 29/37] linux-user: Set ELF_BASE_PLATFORM for MIPS, Laurent Vivier, 2022/09/28
- [PULL 19/37] linux-user: Add proper strace format strings for getdents()/getdents64(), Laurent Vivier, 2022/09/28
- [PULL 31/37] linux-user: Sink call to do_safe_futex, Laurent Vivier, 2022/09/28
- [PULL 34/37] linux-user: Implement PI futexes, Laurent Vivier, 2022/09/28
- [PULL 35/37] linux-user: Update print_futex_op, Laurent Vivier, 2022/09/28