[CRIU] [PATCH 15/15] x86/crtools: rework arch_task_compatible

Cyrill Gorcunov gorcunov at gmail.com
Mon Apr 11 13:08:23 PDT 2016


On Mon, Apr 11, 2016 at 03:19:29PM +0300, Dmitry Safonov wrote:
> Detect task's personality by the size of register set, returned
> by ptrace call with PTRACE_GETREGSET (more reliable).
> The same approach uses strace from 4.8 version:
> https://sourceforge.net/projects/strace/files/strace/4.8/
> 
> Signed-off-by: Dmitry Safonov <dsafonov at virtuozzo.com>
...
>  bool arch_can_dump_task(pid_t pid)
> @@ -92,6 +99,11 @@ bool arch_can_dump_task(pid_t pid)
>  		return false;
>  	}
>  
> +	if (ldt_task_selectors(pid)) {
> +		pr_err("Can't dump task %d with LDT descriptors\n", pid);
> +		return false;
> +	}
> +
>  	return true;
>  }

Actually this hunk better to be in a separate patch, but fine, lets move on.

Reviewed-by: Cyrill Gorcunov <gorcunov at openvz.org>


More information about the CRIU mailing list