[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 40/48] linux-user/signal: Handle BUS_ADRALN in host_signal_han
From: |
Richard Henderson |
Subject: |
[PATCH v4 40/48] linux-user/signal: Handle BUS_ADRALN in host_signal_handler |
Date: |
Tue, 12 Oct 2021 19:45:59 -0700 |
Handle BUS_ADRALN via cpu_loop_exit_sigbus, but allow other SIGBUS
si_codes to continue into the host-to-guest signal coversion code.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
linux-user/signal.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/linux-user/signal.c b/linux-user/signal.c
index df2c8678d0..81c45bfce9 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -860,6 +860,9 @@ static void host_signal_handler(int host_sig, siginfo_t
*info, void *puc)
cpu_loop_exit_sigsegv(cpu, guest_addr, access_type, maperr, pc);
} else {
sigprocmask(SIG_SETMASK, &uc->uc_sigmask, NULL);
+ if (info->si_code == BUS_ADRALN) {
+ cpu_loop_exit_sigbus(cpu, guest_addr, access_type, pc);
+ }
}
sync_sig = true;
--
2.25.1
- [PATCH v4 22/48] accel/tcg: Add cpu_{ld,st}*_mmu interfaces, (continued)
- [PATCH v4 22/48] accel/tcg: Add cpu_{ld,st}*_mmu interfaces, Richard Henderson, 2021/10/12
- [PATCH v4 35/48] target/alpha: Reorg fp memory operations, Richard Henderson, 2021/10/12
- [PATCH v4 36/48] target/alpha: Reorg integer memory operations, Richard Henderson, 2021/10/12
- [PATCH v4 25/48] target/mips: Use 8-byte memory ops for msa load/store, Richard Henderson, 2021/10/12
- [PATCH v4 30/48] tcg: Add helper_unaligned_{ld, st} for user-only sigbus, Richard Henderson, 2021/10/12
- [PATCH v4 39/48] target/sh4: Implement prctl_unalign_sigbus, Richard Henderson, 2021/10/12
- [PATCH v4 27/48] target/sparc: Use cpu_*_mmu instead of helper_*_mmu, Richard Henderson, 2021/10/12
- [PATCH v4 32/48] linux-user: Disable more prctl subcodes, Richard Henderson, 2021/10/12
- [PATCH v4 33/48] Revert "cpu: Move cpu_common_props to hw/core/cpu.c", Richard Henderson, 2021/10/12
- [PATCH v4 38/48] target/hppa: Implement prctl_unalign_sigbus, Richard Henderson, 2021/10/12
- [PATCH v4 40/48] linux-user/signal: Handle BUS_ADRALN in host_signal_handler,
Richard Henderson <=
- [PATCH v4 41/48] tcg: Canonicalize alignment flags in MemOp, Richard Henderson, 2021/10/12
- [PATCH v4 43/48] tcg/aarch64: Support raising sigbus for user-only, Richard Henderson, 2021/10/12
- [PATCH v4 42/48] tcg/i386: Support raising sigbus for user-only, Richard Henderson, 2021/10/12
- [PATCH v4 44/48] tcg/ppc: Support raising sigbus for user-only, Richard Henderson, 2021/10/12
- [PATCH v4 45/48] tcg/s390: Support raising sigbus for user-only, Richard Henderson, 2021/10/12
- [PATCH v4 46/48] tcg/tci: Support raising sigbus for user-only, Richard Henderson, 2021/10/12
- [PATCH v4 47/48] tcg/riscv: Support raising sigbus for user-only, Richard Henderson, 2021/10/12
- [PATCH v4 48/48] tests/tcg/multiarch: Add sigbus.c, Richard Henderson, 2021/10/12