[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-7.2.6 13/37] target/s390x: Fix VSTL with a large length
From: |
Michael Tokarev |
Subject: |
[Stable-7.2.6 13/37] target/s390x: Fix VSTL with a large length |
Date: |
Sat, 9 Sep 2023 16:04:43 +0300 |
From: Ilya Leoshkevich <iii@linux.ibm.com>
The length is always truncated to 16 bytes. Do not probe more than
that.
Cc: qemu-stable@nongnu.org
Fixes: 0e0a5b49ad58 ("s390x/tcg: Implement VECTOR STORE WITH LENGTH")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: <20230804235624.263260-1-iii@linux.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
(cherry picked from commit 6db3518ba4fcddd71049718f138552999f0d97b4)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/target/s390x/tcg/vec_helper.c b/target/s390x/tcg/vec_helper.c
index 48d86722b2..dafc4c3582 100644
--- a/target/s390x/tcg/vec_helper.c
+++ b/target/s390x/tcg/vec_helper.c
@@ -193,7 +193,7 @@ void HELPER(vstl)(CPUS390XState *env, const void *v1,
uint64_t addr,
uint64_t bytes)
{
/* Probe write access before actually modifying memory */
- probe_write_access(env, addr, bytes, GETPC());
+ probe_write_access(env, addr, MIN(bytes, 16), GETPC());
if (likely(bytes >= 16)) {
cpu_stq_data_ra(env, addr, s390_vec_read_element64(v1, 0), GETPC());
--
2.39.2
- [Stable-7.2.6 03/37] hw/smbios: Fix thread count in type4, (continued)
- [Stable-7.2.6 03/37] hw/smbios: Fix thread count in type4, Michael Tokarev, 2023/09/09
- [Stable-7.2.6 04/37] hw/smbios: Fix core count in type4, Michael Tokarev, 2023/09/09
- [Stable-7.2.6 05/37] dump: kdump-zlib data pages not dumped with pvtime/aarch64, Michael Tokarev, 2023/09/09
- [Stable-7.2.6 06/37] hw/nvme: fix CRC64 for guard tag, Michael Tokarev, 2023/09/09
- [Stable-7.2.6 07/37] linux-user/elfload: Set V in ELF_HWCAP for RISC-V, Michael Tokarev, 2023/09/09
- [Stable-7.2.6 08/37] include/exec/user: Set ABI_LLONG_ALIGNMENT to 4 for microblaze, Michael Tokarev, 2023/09/09
- [Stable-7.2.6 09/37] include/exec/user: Set ABI_LLONG_ALIGNMENT to 4 for nios2, Michael Tokarev, 2023/09/09
- [Stable-7.2.6 10/37] Fixed incorrect LLONG alignment for openrisc and cris, Michael Tokarev, 2023/09/09
- [Stable-7.2.6 11/37] target/s390x: Fix the "ignored match" case in VSTRS, Michael Tokarev, 2023/09/09
- [Stable-7.2.6 12/37] target/s390x: Use a 16-bit immediate in VREP, Michael Tokarev, 2023/09/09
- [Stable-7.2.6 13/37] target/s390x: Fix VSTL with a large length,
Michael Tokarev <=
- [Stable-7.2.6 14/37] target/s390x: Check reserved bits of VFMIN/VFMAX's M5, Michael Tokarev, 2023/09/09
- [Stable-7.2.6 15/37] include/hw/virtio/virtio-gpu: Fix virtio-gpu with blob on big endian hosts, Michael Tokarev, 2023/09/09
- [Stable-7.2.6 16/37] kvm: Introduce kvm_arch_get_default_type hook, Michael Tokarev, 2023/09/09
- [Stable-7.2.6 17/37] accel/kvm: Specify default IPA size for arm64, Michael Tokarev, 2023/09/09
- [Stable-7.2.6 18/37] target/arm: Fix SME ST1Q, Michael Tokarev, 2023/09/09
- [Stable-7.2.6 19/37] target/arm: Fix 64-bit SSRA, Michael Tokarev, 2023/09/09
- [Stable-7.2.6 20/37] docs/about/license: Update LICENSE URL, Michael Tokarev, 2023/09/09
- [Stable-7.2.6 21/37] block-migration: Ensure we don't crash during migration cleanup, Michael Tokarev, 2023/09/09
- [Stable-7.2.6 22/37] hw/ppc/e500: fix broken snapshot replay, Michael Tokarev, 2023/09/09
- [Stable-7.2.6 23/37] ppc/vof: Fix missed fields in VOF cleanup, Michael Tokarev, 2023/09/09