From: Cyrill Gorcunov <gorcunov-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
To: richard -rw- weinberger
<richard.weinberger-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: "users-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org"
<users-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>,
Pavel Emelyanov <xemul-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>,
Containers
<containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>,
Linux Kernel Mailing List
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"criu-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org"
<criu-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>,
"lwn-T1hC0tSOHrs@public.gmane.org"
<lwn-T1hC0tSOHrs@public.gmane.org>,
cgroups mailinglist
<cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [Announce] Checkpoint-restore tool v0.1
Date: Tue, 31 Jul 2012 14:30:07 +0400 [thread overview]
Message-ID: <20120731103007.GE2007@moon> (raw)
In-Reply-To: <CAFLxGvxgq9HJJvRgz=z48D7V_j=dTv4jSCLqEZcE=oCBAXnSug-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Tue, Jul 31, 2012 at 12:21:58PM +0200, richard -rw- weinberger wrote:
> On Tue, Jul 31, 2012 at 12:16 PM, Cyrill Gorcunov <gorcunov-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org> wrote:
> > On Tue, Jul 31, 2012 at 12:08:22PM +0200, richard -rw- weinberger wrote:
> >> On Tue, Jul 31, 2012 at 11:54 AM, Pavel Emelyanov <xemul-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org> wrote:
> >> >> Yeah, but I fear it's not that easy.
> >> >> We'd have to change crtools to work without ptrace().
> >> >
> >> > Well, this is hard. Using ptrace saved us from having many special-purpose
> >> > APIs for dumping various stuff (there will be an article about it). Thus I
> >> > don't know which way is simpler -- stop using ptrace or teach ptrece to allow
> >> > several tracers to attach to one task %)
> >>
> >> Allowing multiple tracers in a safe way is IMHO even more harder.
> >>
> >> BTW: While reading prctl_set_mm() I noticed two things.
> >> 1. Why isn't the return value of find_vma() verified?
> >
> > prctl_set_mm
> > vma = find_vma(mm, addr);
> > ...
> > if (!vma) {
> > error = -EFAULT;
> > goto out;
> > }
> >
> > these values are used in procfs statistics only. So I don't get
> > which verify you mean here.
>
> If I do PR_SET_MM_START_BRK the if(!vma) will never be executed because
> there a break in case PR_SET_MM_START_BRK.
Yes, and this is done by purpose, since we need to setup _completely_
new memory map on restore procedure.
There is a minimal check for value being sane
if (addr >= TASK_SIZE || addr < mmap_min_addr)
return -EINVAL;
and the address belongs to mm::start_data|end_data area. But sure,
better to add checks that at least code/data areas do exist, otherwise
the proc output will not reflect the real state of memory maps.
Cyrill
WARNING: multiple messages have this Message-ID (diff)
From: Cyrill Gorcunov <gorcunov@openvz.org>
To: richard -rw- weinberger <richard.weinberger@gmail.com>
Cc: Pavel Emelyanov <xemul@parallels.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"lwn@lwn.net" <lwn@lwn.net>, "criu@openvz.org" <criu@openvz.org>,
"users@openvz.org" <users@openvz.org>,
Containers <containers@lists.linux-foundation.org>,
cgroups mailinglist <cgroups@vger.kernel.org>
Subject: Re: [Announce] Checkpoint-restore tool v0.1
Date: Tue, 31 Jul 2012 14:30:07 +0400 [thread overview]
Message-ID: <20120731103007.GE2007@moon> (raw)
In-Reply-To: <CAFLxGvxgq9HJJvRgz=z48D7V_j=dTv4jSCLqEZcE=oCBAXnSug@mail.gmail.com>
On Tue, Jul 31, 2012 at 12:21:58PM +0200, richard -rw- weinberger wrote:
> On Tue, Jul 31, 2012 at 12:16 PM, Cyrill Gorcunov <gorcunov@openvz.org> wrote:
> > On Tue, Jul 31, 2012 at 12:08:22PM +0200, richard -rw- weinberger wrote:
> >> On Tue, Jul 31, 2012 at 11:54 AM, Pavel Emelyanov <xemul@parallels.com> wrote:
> >> >> Yeah, but I fear it's not that easy.
> >> >> We'd have to change crtools to work without ptrace().
> >> >
> >> > Well, this is hard. Using ptrace saved us from having many special-purpose
> >> > APIs for dumping various stuff (there will be an article about it). Thus I
> >> > don't know which way is simpler -- stop using ptrace or teach ptrece to allow
> >> > several tracers to attach to one task %)
> >>
> >> Allowing multiple tracers in a safe way is IMHO even more harder.
> >>
> >> BTW: While reading prctl_set_mm() I noticed two things.
> >> 1. Why isn't the return value of find_vma() verified?
> >
> > prctl_set_mm
> > vma = find_vma(mm, addr);
> > ...
> > if (!vma) {
> > error = -EFAULT;
> > goto out;
> > }
> >
> > these values are used in procfs statistics only. So I don't get
> > which verify you mean here.
>
> If I do PR_SET_MM_START_BRK the if(!vma) will never be executed because
> there a break in case PR_SET_MM_START_BRK.
Yes, and this is done by purpose, since we need to setup _completely_
new memory map on restore procedure.
There is a minimal check for value being sane
if (addr >= TASK_SIZE || addr < mmap_min_addr)
return -EINVAL;
and the address belongs to mm::start_data|end_data area. But sure,
better to add checks that at least code/data areas do exist, otherwise
the proc output will not reflect the real state of memory maps.
Cyrill
next prev parent reply other threads:[~2012-07-31 10:30 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-23 8:22 [Announce] Checkpoint-restore tool v0.1 Pavel Emelyanov
[not found] ` <500D09C9.7060903-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2012-07-23 8:53 ` Pavel Emelyanov
2012-07-23 8:53 ` Pavel Emelyanov
[not found] ` <500D1116.7070301-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2012-07-23 13:14 ` Serge Hallyn
2012-07-23 13:14 ` Serge Hallyn
2012-07-23 13:14 ` Serge Hallyn
2012-07-30 10:42 ` richard -rw- weinberger
2012-07-30 10:42 ` richard -rw- weinberger
[not found] ` <CAFLxGvwUhEPNdQvUnue2QFu_EipmBKD3nf0MfMWkqwLTf7jd5Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-07-31 8:53 ` Pavel Emelyanov
2012-07-31 8:53 ` Pavel Emelyanov
[not found] ` <50179CF0.7050200-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2012-07-31 8:57 ` richard -rw- weinberger
2012-07-31 8:57 ` richard -rw- weinberger
[not found] ` <CAFLxGvygCxER3gHfj-onwnm_m6xugOVkynGyJU2CDheD3A2HOQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-07-31 9:00 ` Cyrill Gorcunov
2012-07-31 9:00 ` Cyrill Gorcunov
2012-07-31 9:00 ` Cyrill Gorcunov
2012-07-31 9:07 ` Pavel Emelyanov
2012-07-31 9:07 ` Pavel Emelyanov
[not found] ` <5017A053.9000206-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2012-07-31 9:29 ` richard -rw- weinberger
2012-07-31 9:29 ` richard -rw- weinberger
[not found] ` <CAFLxGvy396+BfYSaSnvAwJb0GO4WZCKbPXSbU7YfrOJTo6zk6A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-07-31 9:54 ` Pavel Emelyanov
2012-07-31 9:54 ` Pavel Emelyanov
[not found] ` <5017AB41.60700-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2012-07-31 10:08 ` richard -rw- weinberger
2012-07-31 10:08 ` richard -rw- weinberger
[not found] ` <CAFLxGvwu8-ii7hDbDfco3JrgKgOK+hsdTN_Q--AHbom0Ni8WYA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-07-31 10:16 ` Cyrill Gorcunov
2012-07-31 10:16 ` Cyrill Gorcunov
2012-07-31 10:21 ` richard -rw- weinberger
2012-07-31 10:21 ` richard -rw- weinberger
[not found] ` <CAFLxGvxgq9HJJvRgz=z48D7V_j=dTv4jSCLqEZcE=oCBAXnSug-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-07-31 10:30 ` Cyrill Gorcunov [this message]
2012-07-31 10:30 ` Cyrill Gorcunov
2012-07-31 10:21 ` richard -rw- weinberger
2012-07-31 10:16 ` Cyrill Gorcunov
2012-07-31 9:29 ` richard -rw- weinberger
2012-07-30 10:42 ` richard -rw- weinberger
2012-09-20 10:16 ` [Announce] Checkpoint-restore tool v0.2 Pavel Emelyanov
2012-09-20 10:16 ` Pavel Emelyanov
[not found] ` <505AECF0.6070607-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2012-09-20 13:05 ` Serge Hallyn
2012-09-20 13:05 ` Serge Hallyn
2012-09-20 13:05 ` Serge Hallyn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120731103007.GE2007@moon \
--to=gorcunov-gefaqzzx7r8dnm+yrofe0a@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=criu-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=lwn-T1hC0tSOHrs@public.gmane.org \
--cc=richard.weinberger-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=users-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org \
--cc=xemul-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.