From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Kees Cook <keescook@chromium.org>
Cc: linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Pavel Emelyanov <xemul@parallels.com>,
Serge Hallyn <serge.hallyn@canonical.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Tejun Heo <tj@kernel.org>, Andrew Vagin <avagin@openvz.org>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Alexey Dobriyan <adobriyan@gmail.com>,
Vasiliy Kulikov <segoon@openwall.com>
Subject: Re: [patch 3/4] c/r: procfs: add arg_start/end, env_start/end and exit_code members to /proc/$pid/stat
Date: Tue, 24 Jan 2012 00:53:28 +0400 [thread overview]
Message-ID: <20120123205328.GM1907@moon> (raw)
In-Reply-To: <CAGXu5jJtum19tEKdDAKU3pZYF6k76gpPpwP8ananKhpQDJ8=VQ@mail.gmail.com>
On Mon, Jan 23, 2012 at 12:42:28PM -0800, Kees Cook wrote:
> On Mon, Jan 23, 2012 at 6:20 AM, Cyrill Gorcunov <gorcunov@openvz.org> wrote:
> > We would like to have an ability to restore command line
> > arguments and envirion pointers so the task being restored
> > would print appropriate values in /proc/pid/cmdline and
> > /proc/pid/envirion. The exit_code is needed to restore
> > zombie tasks.
> >
> > Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
> > Cc: Pavel Emelyanov <xemul@parallels.com>
> > Cc: Serge Hallyn <serge.hallyn@canonical.com>
> > Cc: Kees Cook <keescook@chromium.org>
> > Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> > Cc: Alexey Dobriyan <adobriyan@gmail.com>
> > Cc: Tejun Heo <tj@kernel.org>
> > Cc: Andrew Vagin <avagin@openvz.org>
> > Cc: Vasiliy Kulikov <segoon@openwall.com>
> > Cc: Alexey Dobriyan <adobriyan@gmail.com>
> > Cc: "Eric W. Biederman" <ebiederm@xmission.com>
> > ---
> > fs/proc/array.c | 10 ++++++++--
> > 1 file changed, 8 insertions(+), 2 deletions(-)
> >
> > Index: linux-2.6.git/fs/proc/array.c
> > ===================================================================
> > --- linux-2.6.git.orig/fs/proc/array.c
> > +++ linux-2.6.git/fs/proc/array.c
> > @@ -464,7 +464,8 @@ static int do_task_stat(struct seq_file
> >
> > seq_printf(m, "%d (%s) %c %d %d %d %d %d %u %lu \
> > %lu %lu %lu %lu %lu %ld %ld %ld %ld %d 0 %llu %lu %ld %lu %lu %lu %lu %lu \
> > -%lu %lu %lu %lu %lu %lu %lu %lu %d %d %u %u %llu %lu %ld %lu %lu %lu\n",
> > +%lu %lu %lu %lu %lu %lu %lu %lu %d %d %u %u %llu %lu %ld %lu %lu %lu \
> > +%lu %lu %lu %lu %d\n",
> > pid_nr_ns(pid, ns),
> > tcomm,
> > state,
> > @@ -514,7 +515,12 @@ static int do_task_stat(struct seq_file
> > cputime_to_clock_t(cgtime),
> > (mm && permitted) ? mm->start_data : 0,
> > (mm && permitted) ? mm->end_data : 0,
> > - (mm && permitted) ? mm->start_brk : 0);
> > + (mm && permitted) ? mm->start_brk : 0,
> > + (mm && permitted) ? mm->arg_start : 0,
> > + (mm && permitted) ? mm->arg_end : 0,
> > + (mm && permitted) ? mm->env_start : 0,
> > + (mm && permitted) ? mm->env_end : 0,
> > + task->exit_code);
> > if (mm)
> > mmput(mm);
> > return 0;
>
> You're not exposing auxv here? In your testing, what situations ended
> up using auxv after initial startup? Or is your intention to be able
> to freeze a process potentially before libc has examined auxv?
>
auxv already available via /proc/pid/auxv so I thought it would be
redundant to put it into different place. Or you meant something
else?
In testing I simply read auxv values from /proc/pid/auxv and restore
them back via prctl at restore time. (prctl patch is in this series
but it's slightly buggy so I post correct version later).
And intention is simply dump this vector at checkpoint time and
restore when needed.
Cyrill
next prev parent reply other threads:[~2012-01-23 20:53 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-23 14:20 [patch 0/4] A few patches in a sake of c/r functionality Cyrill Gorcunov
2012-01-23 14:20 ` [patch 1/4] fs, proc: Introduce /proc/<pid>/task/<tid>/children entry v8 Cyrill Gorcunov
2012-01-23 18:54 ` Kees Cook
2012-01-23 19:33 ` Cyrill Gorcunov
2012-01-23 20:29 ` Kees Cook
2012-01-23 20:39 ` Cyrill Gorcunov
2012-01-24 2:07 ` KAMEZAWA Hiroyuki
2012-01-24 6:53 ` Cyrill Gorcunov
2012-01-24 7:07 ` KAMEZAWA Hiroyuki
2012-01-24 7:21 ` Cyrill Gorcunov
2012-01-24 8:52 ` Eric W. Biederman
2012-01-24 9:11 ` Cyrill Gorcunov
2012-01-25 1:14 ` KOSAKI Motohiro
2012-01-25 2:11 ` Eric W. Biederman
2012-01-25 6:55 ` Cyrill Gorcunov
2012-01-25 15:29 ` Cyrill Gorcunov
2012-01-24 8:51 ` Cyrill Gorcunov
2012-01-24 23:53 ` Andrew Morton
2012-01-25 6:52 ` Cyrill Gorcunov
2012-01-23 14:20 ` [patch 2/4] [RFC] syscalls, x86: Add __NR_kcmp syscall v4 Cyrill Gorcunov
2012-01-23 18:48 ` H. Peter Anvin
2012-01-23 20:03 ` Cyrill Gorcunov
2012-01-24 2:16 ` KAMEZAWA Hiroyuki
2012-01-24 6:47 ` Cyrill Gorcunov
2012-01-24 7:04 ` H. Peter Anvin
2012-01-24 7:17 ` Cyrill Gorcunov
2012-01-24 7:20 ` KAMEZAWA Hiroyuki
2012-01-24 7:38 ` Cyrill Gorcunov
2012-01-24 7:40 ` KAMEZAWA Hiroyuki
2012-01-24 8:48 ` Cyrill Gorcunov
2012-01-24 20:20 ` KOSAKI Motohiro
2012-01-24 20:26 ` Cyrill Gorcunov
2012-01-24 20:44 ` Eric W. Biederman
2012-01-24 20:50 ` Cyrill Gorcunov
2012-01-24 21:20 ` Eric W. Biederman
2012-01-24 21:34 ` Cyrill Gorcunov
2012-01-24 21:22 ` Andrew Morton
2012-01-24 21:45 ` Andrew Morton
2012-01-24 21:46 ` H. Peter Anvin
2012-01-24 22:00 ` Andrew Morton
2012-01-24 22:52 ` H. Peter Anvin
2012-01-24 23:42 ` Andrew Morton
2012-01-24 21:46 ` Cyrill Gorcunov
2012-01-24 21:59 ` Andrew Morton
2012-01-24 22:54 ` Eric W. Biederman
2012-01-24 22:54 ` Andrew Morton
2012-01-24 21:25 ` Andrew Morton
2012-01-24 21:31 ` Cyrill Gorcunov
2012-01-24 8:49 ` Eric W. Biederman
2012-01-24 8:49 ` Cyrill Gorcunov
2012-01-23 14:20 ` [patch 3/4] c/r: procfs: add arg_start/end, env_start/end and exit_code members to /proc/$pid/stat Cyrill Gorcunov
2012-01-23 20:42 ` Kees Cook
2012-01-23 20:53 ` Cyrill Gorcunov [this message]
2012-01-24 23:59 ` Andrew Morton
2012-01-25 6:54 ` Cyrill Gorcunov
2012-01-25 7:12 ` Andrew Morton
2012-01-25 7:18 ` Cyrill Gorcunov
2012-01-23 14:20 ` [patch 4/4] c/r: prctl: Extend PR_SET_MM to set up more mm_struct entries Cyrill Gorcunov
2012-01-23 15:55 ` Cyrill Gorcunov
2012-01-23 20:02 ` Cyrill Gorcunov
-- strict thread matches above, loose matches on Subject: below --
2012-02-03 15:19 [patch 0/4] [patch 0/4] A pile in c/r sake v2 Cyrill Gorcunov
2012-02-03 15:19 ` [patch 3/4] c/r: procfs: add arg_start/end, env_start/end and exit_code members to /proc/$pid/stat Cyrill Gorcunov
2012-02-03 16:37 ` Kees Cook
2012-02-13 16:48 [patch 0/4] Resending, c/r series v2 Cyrill Gorcunov
2012-02-13 16:48 ` [patch 3/4] c/r: procfs: add arg_start/end, env_start/end and exit_code members to /proc/$pid/stat Cyrill Gorcunov
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=20120123205328.GM1907@moon \
--to=gorcunov@gmail.com \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=avagin@openvz.org \
--cc=ebiederm@xmission.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=segoon@openwall.com \
--cc=serge.hallyn@canonical.com \
--cc=tj@kernel.org \
--cc=xemul@parallels.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).