|
From: Mark W. <ma...@kl...> - 2019-08-23 20:24:53
|
On Fri, Aug 23, 2019 at 09:00:53PM +0200, Mark Wielaard wrote:
> This seems to have broken valgrind on arm64 on some older kernel.
> See the nightly build results for the gcc-114 machine.
> statx returns ENOSYS but it seems the fallback path isn't taken anyway
> for some reason. Resulting in valgrind not being able to execute
> anything.
>
> $ ./vg-in-place /bin/true
> valgrind: /bin/true: Permission denied
>
> Reverting the above commit makes things work again. Still
> investigating.
Turns out (older) arm64 linux kernels are also special.
They don't have statx, but also not stat64 and no stat (!).
It uses fstatat. The new statx patch also added a check for stat.
That needs a special case for arm64:
diff --git a/coregrind/m_libcfile.c b/coregrind/m_libcfile.c
index 5c356ad..c7fca4e 100644
--- a/coregrind/m_libcfile.c
+++ b/coregrind/m_libcfile.c
@@ -393,7 +393,7 @@ SysRes VG_(stat) ( const HChar* file_name, struct vg_stat* vgbuf )
}
}
# endif /* defined(__NR_stat64) */
-# if defined(__NR_stat)
+# if defined(__NR_stat) || defined(VGP_arm64_linux)
/* This is the fallback ("vanilla version"). */
{ struct vki_stat buf;
# if defined(VGP_arm64_linux)
Pushed to master.
Cheers,
Mark
|