[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 01/21] linux-user: Fix guest signal remapping after adjusting SIGA
|
From: |
Richard Henderson |
|
Subject: |
[PULL 01/21] linux-user: Fix guest signal remapping after adjusting SIGABRT |
|
Date: |
Mon, 30 Oct 2023 14:17:07 -0700 |
The arithmetic within the loop was not adjusted properly after SIGRTMIN
was stolen for the guest SIGABRT. The effect was that the guest libc
could not send itself __SIGRTMIN to wake sleeping threads.
Fixes: 38ee0a7dfb4b ("linux-user: Remap guest SIGABRT")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1967
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
linux-user/signal.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/linux-user/signal.c b/linux-user/signal.c
index 3b8efec89f..b35d1e512f 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -536,11 +536,10 @@ static void signal_table_init(void)
host_to_target_signal_table[SIGABRT] = 0;
host_to_target_signal_table[hsig++] = TARGET_SIGABRT;
- for (; hsig <= SIGRTMAX; hsig++) {
- tsig = hsig - SIGRTMIN + TARGET_SIGRTMIN;
- if (tsig <= TARGET_NSIG) {
- host_to_target_signal_table[hsig] = tsig;
- }
+ for (tsig = TARGET_SIGRTMIN;
+ hsig <= SIGRTMAX && tsig <= TARGET_NSIG;
+ hsig++, tsig++) {
+ host_to_target_signal_table[hsig] = tsig;
}
/* Invert the mapping that has already been assigned. */
--
2.34.1
- [PULL 00/21] linux-user patch queue, Richard Henderson, 2023/10/30
- [PULL 02/21] linux-user: Introduce imgsrc_read, imgsrc_read_alloc, Richard Henderson, 2023/10/30
- [PULL 05/21] linux-user: Use ImageSource in load_elf_image, Richard Henderson, 2023/10/30
- [PULL 18/21] linux-user/s390x: Rename __SIGNAL_FRAMESIZE to STACK_FRAME_OVERHEAD, Richard Henderson, 2023/10/30
- [PULL 07/21] linux-user: Replace bprm->fd with bprm->src.fd, Richard Henderson, 2023/10/30
- [PULL 04/21] linux-user: Do not clobber bprm_buf swapping ehdr, Richard Henderson, 2023/10/30
- [PULL 10/21] linux-user/i386: Add vdso, Richard Henderson, 2023/10/30
- [PULL 12/21] linux-user/aarch64: Add vdso, Richard Henderson, 2023/10/30
- [PULL 01/21] linux-user: Fix guest signal remapping after adjusting SIGABRT,
Richard Henderson <=
- [PULL 21/21] build: Add update-linux-vdso makefile rule, Richard Henderson, 2023/10/30
- [PULL 17/21] linux-user/ppc: Add vdso, Richard Henderson, 2023/10/30
- [PULL 19/21] linux-user/s390x: Add vdso, Richard Henderson, 2023/10/30
- [PULL 08/21] linux-user: Load vdso image if available, Richard Henderson, 2023/10/30
- [PULL 20/21] linux-user: Show vdso address in /proc/pid/maps, Richard Henderson, 2023/10/30
- [PULL 14/21] linux-user/hppa: Add vdso, Richard Henderson, 2023/10/30
- [PULL 03/21] linux-user: Tidy loader_exec, Richard Henderson, 2023/10/30
- [PULL 06/21] linux-user: Use ImageSource in load_symbols, Richard Henderson, 2023/10/30
- [PULL 09/21] linux-user: Add gen-vdso tool, Richard Henderson, 2023/10/30
- [PULL 11/21] linux-user/x86_64: Add vdso, Richard Henderson, 2023/10/30