[CRIU] [PATCH 2/6] Skip generating iov for non PROT_READ region
Pavel Emelianov
xemul at virtuozzo.com
Tue Jul 30 15:37:30 MSK 2019
On 7/25/19 4:13 AM, Abhishek Dubey wrote:
> skip iov-generation for regions not having PROT_READ,
> since process_vm_readv syscall fail to process such regions
>
> Signed-off-by: Abhishek Dubey <dubeyabhishek777 at gmail.com>
> ---
> criu/mem.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/criu/mem.c b/criu/mem.c
> index a7e8d0b..5c13690 100644
> --- a/criu/mem.c
> +++ b/criu/mem.c
> @@ -361,6 +361,12 @@ static int generate_vma_iovs(struct pstree_item *item, struct vma_area *vma,
> !vma_area_is(vma, VMA_ANON_SHARED))
> return 0;
>
> + if (!(vma->e->prot & PROT_READ)) {
> + if (pre_dump)
> + return 0;
> + has_parent = false;
Why setting this to false in this case?
> + }
> +
> if (vma_entry_is(vma->e, VMA_AREA_AIORING)) {
> if (pre_dump)
> return 0;
>
More information about the CRIU
mailing list