[CRIU] [PATCH 2/4] prctl: kerndat -- Add kerndat_prctl_may_use_mm_map helper

Pavel Emelyanov xemul at parallels.com
Tue Aug 5 23:43:30 PDT 2014


On 07/25/2014 06:12 PM, Cyrill Gorcunov wrote:
> 
> It tests if new prctl interface is present in the kernel
> and will be used on restore and check procedures.
> 
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
>  include/kerndat.h |  2 ++
>  kerndat.c         | 18 ++++++++++++++++++
>  2 files changed, 20 insertions(+)
> 
> +int kerndat_prctl_may_use_mm_map(void)
> +{
> +	static int prctl_may_use_mm_map = -1;
> +
> +	if (prctl_may_use_mm_map == -1) {

Why not just in the pie code do

if (prlctl(NEWAPI) == EOPNOTSUPP))
	prlctl(OLDAPI);

?

Thanks,
Pavel



More information about the CRIU mailing list