[CRIU] [PATCH] s390: Prevent GOT relocations

Adrian Reber areber at redhat.com
Fri Jul 14 15:08:31 MSK 2017


Thanks for the patch. I tried it on my s390 test system and I get the
following error now:

(00.002625)        f15 0000000000000000
(00.002626)        No VXRS
(00.002628) Putting tsock into pid 24
(00.002639) ptrace_set_regs: pid=24
(00.002656) Error (compel/src/lib/infect.c:633): Unable to connect a transport socket: Function not implemented
(00.002665) Error (compel/src/lib/infect.c:559): Can't inject syscall blob (pid: 24)
(00.002667) Error (compel/src/lib/infect.c:1312): munmap for remote map 0x3fffd5c5000, 53248 returned 4398002229248
(00.002669) Error (criu/cr-dump.c:1362): Can't infect (pid: 24) with parasite
(00.002720) Unlock network
(00.002735) Unfreezing tasks into 1
(00.002737) 	Unseizing 24 into 1
(00.002740) Error (compel/src/lib/infect.c:341): Unable to detach from 24: No such process
(00.002745) 	Unseizing 25 into 1
(00.002754) Error (criu/cr-dump.c:1800): Dumping FAILED.

Could it be that my s390 kernel is missing something?

# criu/criu check --all
Error (criu/cr-check.c:626): Kernel doesn't support PTRACE_O_SUSPEND_SECCOMP
Error (criu/cr-check.c:670): Dumping seccomp filters not supported: Input/output error
Warn  (criu/cr-check.c:683): Dirty tracking is OFF. Memory snapshot will not work.
Error (criu/cr-check.c:895): cgroupns not supported. This is not fatal.
Warn  (criu/net.c:2504): Unable to get a socket network namespace
Warn  (criu/cr-check.c:1044): CRIU built without CONFIG_COMPAT - can't C/R ia32
Error (criu/cr-check.c:1060): UFFD is not supported
Looks good but some kernel features are missing
which, depending on your process tree, may cause
dump or restore failure.

		Adrian

On Fri, Jul 14, 2017 at 11:23:26AM +0200, Michael Holzheu wrote:
> Use the "-fno-optimize-sibling-calls" gcc option to prevent GOT relocations
> caused by gcc versions without the commit "S/390: Fix 64 bit sibcall":
> 
>  * https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=233169
> 
> Otherwise we get compile errors like:
> 
>  GEN      criu/pie/parasite-blob.h
>  Error (compel/src/lib/handle-elf-host.c:572):
>  Unsupported relocation of type 26
> 
> Those can be caused by the following relocation types:
> 
>  * R_390_GOTENT (e.g. RHEL7 based systems)
>  * R_390_GOTPCDBL (e.g. Debian Jessie)
>  * R_390_GOT12 (e.g. Debian Jessie)
> 
> Signed-off-by: Michael Holzheu <holzheu at linux.vnet.ibm.com>
> ---
>  Makefile.compel | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/Makefile.compel b/Makefile.compel
> index 9b40079..5c854e3 100644
> --- a/Makefile.compel
> +++ b/Makefile.compel
> @@ -71,10 +71,12 @@ compel-install-targets	+= compel/$(LIBCOMPEL_SO)
>  compel-install-targets	+= compel/compel
>  compel-install-targets	+= $(compel-plugins)
>  
> -# We assume that compel code does not change floating point registers.
> -# On s390 gcc uses fprs to cache gprs. Therefore disable floating point
> -# with -msoft-float.
> +#
> +# Also ensure with -fno-optimize-sibling-calls that we don't create GOT
> +# (Global Offset Table) relocations with gcc compilers that don't have
> +# commit "S/390: Fix 64 bit sibcall".
> +#
>  ifeq ($(ARCH),s390)
> -CFLAGS += -msoft-float
> -HOSTCFLAGS += -msoft-float
> +CFLAGS += -msoft-float -fno-optimize-sibling-calls
> +HOSTCFLAGS += -msoft-float -fno-optimize-sibling-calls
>  endif
> -- 
> 2.7.4
> 


More information about the CRIU mailing list