From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org
Cc: Stefan Hajnoczi <stefanha@redhat.com>,
Ilya Leoshkevich <iii@linux.ibm.com>,
qemu-stable@nongnu.org, David Hildenbrand <david@redhat.com>
Subject: [PULL 04/12] target/s390x: Fix VSTL with a large length
Date: Wed, 23 Aug 2023 13:45:36 +0200 [thread overview]
Message-ID: <20230823114544.216520-5-thuth@redhat.com> (raw)
In-Reply-To: <20230823114544.216520-1-thuth@redhat.com>
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>
---
target/s390x/tcg/vec_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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.3
next prev parent reply other threads:[~2023-08-23 11:51 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-23 11:45 [PULL 00/12] First batch of s390x patches for QEMU 8.2 Thomas Huth
2023-08-23 11:45 ` [PULL 01/12] hw: Add compat machines for 8.2 Thomas Huth
2023-08-23 11:45 ` [PULL 02/12] s390x: Convert DPRINTF to trace events Thomas Huth
2023-08-23 11:45 ` [PULL 03/12] target/s390x: Check reserved bits of VFMIN/VFMAX's M5 Thomas Huth
2023-08-23 11:45 ` Thomas Huth [this message]
2023-08-23 11:45 ` [PULL 05/12] tests/tcg/s390x: Test VSTL Thomas Huth
2023-08-23 11:45 ` [PULL 06/12] target/s390x: Use a 16-bit immediate in VREP Thomas Huth
2023-08-23 11:45 ` [PULL 07/12] tests/tcg/s390x: Test VREP Thomas Huth
2023-08-23 11:45 ` [PULL 08/12] hw/s390x/s390-virtio-ccw: Remove superfluous code to set the NIC model Thomas Huth
2023-08-23 11:45 ` [PULL 09/12] include/hw/virtio/virtio-gpu: Fix virtio-gpu with blob on big endian hosts Thomas Huth
2023-08-23 14:00 ` Michael Tokarev
2023-08-23 14:02 ` Thomas Huth
2023-08-23 14:03 ` Michael Tokarev
2023-08-23 11:45 ` [PULL 10/12] linux-user/elfload: Enable vxe2 on s390x Thomas Huth
2023-08-23 11:45 ` [PULL 11/12] target/s390x: Fix the "ignored match" case in VSTRS Thomas Huth
2023-08-23 11:45 ` [PULL 12/12] tests/tcg/s390x: Test VSTRS Thomas Huth
2023-08-23 13:19 ` [PULL 00/12] First batch of s390x patches for QEMU 8.2 Stefan Hajnoczi
2023-08-23 16:34 ` Stefan Hajnoczi
2023-08-24 6:52 ` Thomas Huth
2023-08-24 14:51 ` Stefan Hajnoczi
2023-08-24 16:10 ` Thomas Huth
2023-08-24 16:21 ` Peter Maydell
2023-08-25 4:51 ` Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230823114544.216520-5-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=david@redhat.com \
--cc=iii@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).