const HChar* filename )
{
Int iLo, iHi, i;
- Bool sloppyXcheck;
+ Bool sloppyXcheck, sloppyRcheck;
/* If a problem has already been detected, don't continue comparing
segments, so as to avoid flooding the output with error
sloppyXcheck = False;
# endif
+ /* Some kernels on s390 provide 'r' permission even when it was not
+ explicitly requested. It seems that 'x' permission implies 'r'. */
+# if defined(VGA_s390x)
+ sloppyRcheck = True;
+# else
+ sloppyRcheck = False;
+# endif
+
/* NSegments iLo .. iHi inclusive should agree with the presented
data. */
for (i = iLo; i <= iHi; i++) {
seg_prot |= VKI_PROT_EXEC;
}
+ if (sloppyRcheck && (prot & (VKI_PROT_EXEC | VKI_PROT_READ)) ==
+ (VKI_PROT_EXEC | VKI_PROT_READ)) {
+ seg_prot |= VKI_PROT_READ;
+ }
+
same = same
&& seg_prot == prot
&& (cmp_devino