[CRIU] [PATCH 2/7] x86/compat: don't set has_compat_sigreturn if !CONFIG_COMPAT
Dmitry Safonov
dsafonov at virtuozzo.com
Mon Jan 9 09:19:07 PST 2017
We can be on v4.9 or newer kernel, but have no 32-bit multilib
toolchain, which will result in !CONFIG_COMPAT but
kdat_compat_sigreturn_test() will return true as we have
new arch_prctls in kernel needed for compatible C/R.
Fail compat test in this case.
Reported-by: Andrei Vagin <avagin at virtuozzo.com>
Signed-off-by: Dmitry Safonov <dsafonov at virtuozzo.com>
---
criu/arch/x86/crtools.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/criu/arch/x86/crtools.c b/criu/arch/x86/crtools.c
index ba0145b27507..0c3851adc43a 100644
--- a/criu/arch/x86/crtools.c
+++ b/criu/arch/x86/crtools.c
@@ -30,6 +30,7 @@
#ifdef CONFIG_X86_64
int kdat_compat_sigreturn_test(void)
{
+#ifdef CONFIG_COMPAT
unsigned long auxval;
int ret;
@@ -46,6 +47,7 @@ int kdat_compat_sigreturn_test(void)
ret = syscall(SYS_arch_prctl, ARCH_MAP_VDSO_32, 1);
if (ret == -1 && errno == EEXIST)
return 1;
+#endif
return 0;
}
#endif /* CONFIG_X86_64 */
--
2.11.0
More information about the CRIU
mailing list