[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-9.1.1 20/32] target/hppa: Fix random 32-bit linux-user crashes
From: |
Michael Tokarev |
Subject: |
[Stable-9.1.1 20/32] target/hppa: Fix random 32-bit linux-user crashes |
Date: |
Mon, 7 Oct 2024 22:16:37 +0300 |
From: Helge Deller <deller@gmx.de>
The linux-user hppa target crashes randomly for me since commit
081a0ed188d8 ("target/hppa: Do not mask in copy_iaoq_entry").
That commit dropped the masking of the IAOQ addresses while copying them
from other registers and instead keeps them with all 64 bits up until
the full gva is formed with the help of hppa_form_gva_psw().
So, when running in linux-user mode on an emulated 64-bit CPU, we need
to mask to a 32-bit address space at the very end in hppa_form_gva_psw()
if the PSW-W flag isn't set (which is the case for linux-user on hppa).
Fixes: 081a0ed188d8 ("target/hppa: Do not mask in copy_iaoq_entry")
Cc: qemu-stable@nongnu.org # v9.1+
Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
(cherry picked from commit d33d3adb573794903380e03e767e06470514cefe)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/target/hppa/cpu.h b/target/hppa/cpu.h
index 5478b183dc..43074d80bf 100644
--- a/target/hppa/cpu.h
+++ b/target/hppa/cpu.h
@@ -319,7 +319,7 @@ static inline target_ulong hppa_form_gva_psw(target_ulong
psw, uint64_t spc,
target_ulong off)
{
#ifdef CONFIG_USER_ONLY
- return off;
+ return off & gva_offset_mask(psw);
#else
return spc | (off & gva_offset_mask(psw));
#endif
--
2.39.5
- [Stable-9.1.1 10/32] hw/intc/arm_gic: fix spurious level triggered interrupts, (continued)
- [Stable-9.1.1 10/32] hw/intc/arm_gic: fix spurious level triggered interrupts, Michael Tokarev, 2024/10/07
- [Stable-9.1.1 11/32] ui/sdl2: set swap interval explicitly when OpenGL is enabled, Michael Tokarev, 2024/10/07
- [Stable-9.1.1 12/32] gitlab: fix logic for changing docker tag on stable branches, Michael Tokarev, 2024/10/07
- [Stable-9.1.1 13/32] softmmu: Support concurrent bounce buffers, Michael Tokarev, 2024/10/07
- [Stable-9.1.1 14/32] softmmu/physmem: fix memory leak in dirty_memory_extend(), Michael Tokarev, 2024/10/07
- [Stable-9.1.1 15/32] softmmu/physmem.c: Keep transaction attribute in address_space_map(), Michael Tokarev, 2024/10/07
- [Stable-9.1.1 16/32] mac_dbdma: Remove leftover `dma_memory_unmap` calls, Michael Tokarev, 2024/10/07
- [Stable-9.1.1 17/32] migration/multifd: Fix rb->receivedmap cleanup race, Michael Tokarev, 2024/10/07
- [Stable-9.1.1 18/32] hw/char/stm32l4x5_usart.c: Enable USART ACK bit response, Michael Tokarev, 2024/10/07
- [Stable-9.1.1 19/32] target/arm: Correct ID_AA64ISAR1_EL1 value for neoverse-v1, Michael Tokarev, 2024/10/07
- [Stable-9.1.1 20/32] target/hppa: Fix random 32-bit linux-user crashes,
Michael Tokarev <=
- [Stable-9.1.1 26/32] hw/mips/jazz: fix typo in in-built NIC alias, Michael Tokarev, 2024/10/07
- [Stable-9.1.1 25/32] target/ppc: Fix lxvx/stxvx facility check, Michael Tokarev, 2024/10/07
- [Stable-9.1.1 30/32] hw/sd/sdcard: Fix handling of disabled boot partitions, Michael Tokarev, 2024/10/07
- [Stable-9.1.1 21/32] target/ppc: Fix migration of CPUs with TLB_EMB TLB type, Michael Tokarev, 2024/10/07
- [Stable-9.1.1 23/32] hw/loongarch/virt: Add description for virt machine type, Michael Tokarev, 2024/10/07
- [Stable-9.1.1 22/32] migration/multifd: Fix p->iov leak in multifd-uadk.c, Michael Tokarev, 2024/10/07
- [Stable-9.1.1 32/32] vnc: fix crash when no console attached, Michael Tokarev, 2024/10/07
- [Stable-9.1.1 31/32] testing: bump mips64el cross to bookworm and fix package list, Michael Tokarev, 2024/10/07
- [Stable-9.1.1 27/32] util/timer: avoid deadlock when shutting down, Michael Tokarev, 2024/10/07
- [Stable-9.1.1 29/32] target/arm: Avoid target_ulong for physical address lookups, Michael Tokarev, 2024/10/07