[CRIU] [PATCH 08/10] restore: set up a handler for collecting signals from zombies

Alexander Kartashov alekskartashov at parallels.com
Wed Mar 6 08:48:47 EST 2013


On 03/05/2013 06:54 PM, Andrey Vagin wrote:
> diff --git a/pie/restorer.c b/pie/restorer.c
> index d88fc7b..9f04f1b 100644
> --- a/pie/restorer.c
> +++ b/pie/restorer.c
> @@ -11,6 +11,7 @@
>   #include <unistd.h>
>   #include <sched.h>
>   #include <sys/resource.h>
> +#include <signal.h>
>   
>   #include "compiler.h"
>   #include "asm/types.h"
> @@ -39,6 +40,20 @@
>   static struct task_entries *task_entries;
>   static futex_t thread_inprogress;
>   
> +asm (								\
> +	"nop\n"							\
> +	".align 16\n"						\
> +	"__cr_restore_rt:\n"					\
> +	"       movq $"__stringify(__NR_rt_sigreturn)", %rax\n"	\
> +	"       syscall"					\
> +);

I think architecture-dependent code shouldn't be here.
I think it's better to move it to arch/x86/restorer.c.

Is it possible to move this assembly there?

-- 
Sincerely yours,
Alexander Kartashov

Intern
Core team

www.parallels.com

Skype: aleksandr.kartashov
Email: alekskartashov at parallels.com



More information about the CRIU mailing list