]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
mips: enable sloppyXcheck for mips32 and mips64
authorPetar Jovanovic <mips32r2@gmail.com>
Wed, 27 Nov 2019 12:22:46 +0000 (12:22 +0000)
committerPetar Jovanovic <mips32r2@gmail.com>
Wed, 27 Nov 2019 12:22:46 +0000 (12:22 +0000)
Newer mips kernels (post 4.7.0) assign execute permissions to loadable
program segments which originally did not have them as per the
information provided in the elf file itself.

Include mips32/mips64 in the list of architectures for which the address
space manager should allow the kernel to report execute permissions in
sync_check_mapping_callback.

Patch by Stefan Maksimovic.

coregrind/m_aspacemgr/aspacemgr-linux.c

index 7ddef30775f5a588bf12c61d74bb71f021d13f0a..7c4c4eb734dde6166e713d650beee22d7ff1e519 100644 (file)
@@ -818,7 +818,8 @@ static void sync_check_mapping_callback ( Addr addr, SizeT len, UInt prot,
       have a sloppyXcheck mode which we enable on x86 and s390 - in this
       mode we allow the kernel to report execute permission when we weren't
       expecting it but not vice versa. */
-#  if defined(VGA_x86) || defined (VGA_s390x)
+#  if defined(VGA_x86) || defined (VGA_s390x) || \
+      defined(VGA_mips32) || defined(VGA_mips64)
    sloppyXcheck = True;
 #  else
    sloppyXcheck = False;