]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Bug 412377 - SIGILL on cache flushes on arm64
authorPaul Floyd <pjfloyd@wanadoo.fr>
Sat, 11 May 2024 13:21:47 +0000 (15:21 +0200)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Sat, 11 May 2024 13:23:21 +0000 (15:23 +0200)
Patch contributed by
Adam Borowski <kilobyte@angband.pl>

NEWS
VEX/priv/guest_arm64_helpers.c
VEX/priv/guest_arm64_toIR.c

diff --git a/NEWS b/NEWS
index 82c5bac4ec3c33f551572dcc8f85d87014f6c75b..514249e0e547507fcb417416d8ad1406491d3248 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -24,6 +24,7 @@ than mailing the developers (or mailing lists) directly -- bugs that
 are not entered into bugzilla tend to get forgotten about or ignored.
 
 392146  aarch64: unhandled instruction 0xD5380001 (MRS rT, midr_el1)
+412377  SIGILL on cache flushes on arm64
 486180  [Valgrind][MIPS] 'VexGuestArchState' has no member named 'guest_IP_AT_SYSCALL'
 486293  memccpy false positives
 486569  linux inotify_init syscall wrapper missing POST entry in syscall_table
index 736e83620a09de107e9a8b292bf9e3d4fcf82fb1..8c8ebcb1ad699c4afd5af71884eadc52a3a6c26d 100644 (file)
@@ -932,11 +932,6 @@ ULong arm64g_dirtyhelper_MRS_ID_AA64ISAR1_EL1 ( void )
 
    // only nibble 0 DBP
    w &= 0xF;
-   /* No dc cvadp only dc cvap */
-   if ( w & 0x2 ) {
-      w ^= 0x2;
-      w |= 0x1;
-   }
 
    return w;
 #  else
index eebe6963ea46d9dcd0ee8749869cd6dc76354071..17191268567a6c530a5a7deb81d53076e199dddc 100644 (file)
@@ -7987,15 +7987,17 @@ Bool dis_ARM64_branch_etc(/*MB_OUT*/DisResult* dres, UInt insn,
    }
 
    /* ------------------ DC_CVAU ------------------ */
-   /* D5 0B 7B 001 Rt  dc cvau, rT
-      D5 0B 7E 001 Rt  dc civac, rT
-      D5 0B 7A 001 Rt  dc cvac, rT
+   /* D5 0B 7A 001 Rt  dc cvac, rT
+      D5 0B 7B 001 Rt  dc cvau, rT
       D5 0B 7C 001 Rt  dc cvap, rT
+      D5 0B 7D 001 Rt  dc cvadp, rT
+      D5 0B 7E 001 Rt  dc civac, rT
    */
-   if (   (INSN(31,0) & 0xFFFFFFE0) == 0xD50B7B20
-       || (INSN(31,0) & 0xFFFFFFE0) == 0xD50B7E20
-       || ((INSN(31,0) & 0xFFFFFFE0) == 0xD50B7A20)
-       || ((INSN(31,0) & 0xFFFFFFE0) == 0xD50B7C20)) {
+   if (   (INSN(31,0) & 0xFFFFFFE0) == 0xD50B7A20
+       && (INSN(31,0) & 0xFFFFFFE0) == 0xD50B7B20
+       && (INSN(31,0) & 0xFFFFFFE0) == 0xD50B7C20
+       && (INSN(31,0) & 0xFFFFFFE0) == 0xD50B7D20
+       && (INSN(31,0) & 0xFFFFFFE0) == 0xD50B7E20) {
       /* Exactly the same scheme as for IC IVAU, except we observe the
          dMinLine size, and request an Ijk_FlushDCache instead of
          Ijk_InvalICache. */