Commit 7f1c9af0 authored by Pavel Emelyanov's avatar Pavel Emelyanov

vma: State that vma->fd is -1 constant in the image

This field was lost while switching to protobuf -- the vma images
were used by parasite as plain array and it was easier to reseve
this space in the image. Now it's too late to change this, so make
it be -1 always.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 321a71fd
...@@ -166,6 +166,13 @@ static int read_and_open_vmas(int pid, struct list_head *vmas, int *nr_vmas) ...@@ -166,6 +166,13 @@ static int read_and_open_vmas(int pid, struct list_head *vmas, int *nr_vmas)
if (ret <= 0) if (ret <= 0)
break; break;
if (e->fd != -1) {
ret = -1;
pr_err("Error in vma->fd setting (%Ld)\n",
(unsigned long long)e->fd);
break;
}
vma->vma = *e; vma->vma = *e;
vma_entry__free_unpacked(e, NULL); vma_entry__free_unpacked(e, NULL);
......
...@@ -6,5 +6,8 @@ message vma_entry { ...@@ -6,5 +6,8 @@ message vma_entry {
required uint32 prot = 5; required uint32 prot = 5;
required uint32 flags = 6; required uint32 flags = 6;
required uint32 status = 7; required uint32 status = 7;
// This fd thing is unused in the image, it was lost
// while switching from execve restore model. It is
// -1 by default.
required sint64 fd = 8; required sint64 fd = 8;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment