[CRIU] [PATCH] Preserve the dumpable flag on criu dump/restore.

Pavel Emelyanov xemul at parallels.com
Tue May 13 05:00:46 PDT 2014


On 05/13/2014 03:36 AM, Filipe Brandenburger wrote:
> Preserve the dumpable flag, which affects whether a core dump will be
> generated, but also affects the ownership of the virtual files under
> /proc/$pid after restoring a process.
> 
> Tested: Restored a process with a criu including this patch and looked
> at /proc/$pid to confirm that the virtual files were no longer all owned
> by root:root.
> 
> zdtm tests pass except for cow01 which seems to be broken.
> (see https://bugzilla.openvz.org/show_bug.cgi?id=2967 for details.)
> 
> This patch fixes https://bugzilla.openvz.org/show_bug.cgi?id=2968
> 
> Signed-off-by: Filipe Brandenburger <filbranden at google.com>
> ---

Technically patch is correct. Can you do a cosmetic change, please?

> @@ -16,4 +16,6 @@ message creds_entry {
>  	required uint32	secbits	= 13;
>  
>  	repeated uint32	groups	= 14;
> +
> +	optional uint32	dumpable = 15;

The dumpable bits go to task->mm in the kernel, so this field should be
moved to mm images.

>  }
> 


> @@ -162,6 +162,7 @@ struct parasite_dump_misc {
>  
>  struct parasite_dump_creds {
>  	unsigned int		secbits;
> +	unsigned int		dumpable;

And just to fit the above change -- dumping should be put into the
dump-misc code.

>  	unsigned int		ngroups;
>  	unsigned int		groups[PARASITE_MAX_GROUPS];
>  };

Thanks,
Pavel


More information about the CRIU mailing list