[CRIU] [PATCH] arch/ppc64: Add PowerPC 64 LE support

Laurent Dufour ldufour at linux.vnet.ibm.com
Thu Apr 30 00:24:14 PDT 2015


On 30/04/2015 09:03, Pavel Emelyanov wrote:
> On 04/29/2015 08:04 PM, Cyrill Gorcunov wrote:
>> On Wed, Apr 29, 2015 at 05:47:15PM +0200, Laurent Dufour wrote:
>>> This patch initiates the ppc64le architecture support in CRIU.
>>>
>>
>> Thank a huge for working on this! 'cause I'm not familiar with ppc
>> much I can't comment here anything, but since the changes are per-arch
>> mostly I think we should grab it. Pavel?
> 
> Sure :) I've merged the patch in, thanks a lot, Laurent!
> 
> I have only two comments/questions:
> 
>> On the long term, relocation should be done when loading the parasite code.
> 
> I guess this what Cyrill is also thinking about.
> 
> 
>> @@ -2751,8 +2751,13 @@ static int sigreturn_restore(pid_t pid, CoreEntry *core)
>>  	 * might be completely unused so it's here just for convenience.
>>  	 */
>>  	restore_thread_exec_start	= restorer_sym(exec_mem_hint, __export_restore_thread);
>> +#ifdef CONFIG_PPC64
>> +	restore_task_exec_start		= restorer_sym(exec_mem_hint, __export_restore_task_trampoline);
>> +	rsti(current)->munmap_restorer	= restorer_sym(exec_mem_hint, __export_unmap_trampoline);
>> +#else
>>  	restore_task_exec_start		= restorer_sym(exec_mem_hint, __export_restore_task);
>>  	rsti(current)->munmap_restorer	= restorer_sym(exec_mem_hint, __export_unmap);
>> +#endif
>>  
>>  	exec_mem_hint += restorer_len;
>>  
> 
> Can we beautify this a little bit by doing the
> 
> #define __export_restore_task __export_restreo_task_trampoline
> #define __export_unmap __export_unmap_trampoline
> 
> somewhere outside of the sigreturn_restore()?

I do agree.

What about letting the arch overwriting these symbols and in the case
there is no arch specific symbol, falling back to the default ones.

I mean something like that :

arch/ppc64/include/asm/restore.h:
#define arch_export_restore_task 	__export_restore_task_trampoline
#define arch_export_unmap		__export_unmap_trampoline

cr-restore.c:
#ifndef arch_export_restore_task
#define arch_export_restore_task 	__export_restore_task
#endif
#ifndef arch_export_unmap
#define arch_export_unmap		__export_unmap
#endif

Laurent.



More information about the CRIU mailing list