[CRIU] ppc64le criu auxv problems

Laurent Dufour ldufour at linux.vnet.ibm.com
Wed Aug 9 17:11:45 MSK 2017


On 07/08/2017 17:17, Pavel Emelyanov wrote:
> On 08/04/2017 01:11 PM, Adrian Reber wrote:
>> I have problems building CRIU on ppc64le and running the binary on
>> different kernel versions. This is from the standpoint of providing a
>> distribution package. I want to build criu on a 3.10 kernel and have the
>> same binary run on 4.1x.y
>>
>> The problem with ppc64le is that the following test tells me that there
>> is something wrong:
>>
>> ############## Test zdtm/static/cmdlinenv00 FAIL at result check ###############
>> Test output: ================================
>> 06:02:02.188:    30: old cmdline: ./cmdlinenv00
>> 06:02:02.188:    30: old environ: RHTS_OPTION_COMPAT_SERVICE=
>> 06:02:02.300:    30: new cmdline: ./cmdlinenv00
>> 06:02:02.300:    30: new environ: RHTS_OPTION_COMPAT_SERVICE=
>> 06:02:02.300:    30: FAIL: cmdlinenv00.c:116: auxv corrupted on restore (errno = 11 (Resource temporarily unavailable))
>>
>>
>> which is correct and kind of related to:
>>
>>     commit c10e0d215412edac55e941f57cc4ba80422968dd
>>     Author: Gianfranco Costamagna <costamagnagianfranco at yahoo.it>
>>     Date:   Wed Jul 5 12:50:07 2017 +0200
>>     
>>         Fix ppc64el build failure, by not redefining AT_VECTOR_SIZE_ARCH
>>
>>
>> CRIU hardcodes it to 6 and newer kernels set it to 14. So if I compile
>> my CRIU package on an older kernel it is set to 6. If I run the same RPM
>> on a newer kernel I get the failure from above as it does not match the
>> compile time values any more. Any ideas how to solve this during
>> runtime?
> 
> So the question is about how to auto-detect the aux vector size? Heh ... need
> to look at the kernel, maybe the answer is obvious :)

I didn't find a direct way to get that value. However, auxv_read() which is
called when reading /proc/self/auxv is returning the number of words up to
AT_NULL. So IIRC we could be able to compute the size of the vector to dump
dynamically.

Hope this helps..

By the way, recent kernel changes to enable large system implies to change
at build time TASK_SIZE_USER64 in compel/arch/ppc64/src/lib/infect.c to
match the kernel value. It seems there also that there is easy way to
retrieve this value dynamically :(

Cheers,
Laurent.



More information about the CRIU mailing list