linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: u3557@miso.sublimeip.com (Amnon Shiloh)
To: rostedt@goodmis.org (Steven Rostedt)
Cc: u3557@dialix.com.au, oleg@redhat.com (Oleg Nesterov),
	palves@redhat.com (Pedro Alves),
	dvlasenk@redhat.com (Denys Vlasenko),
	jan.kratochvil@redhat.com (Jan Kratochvil),
	gorcunov@openvz.org (Cyrill Gorcunov),
	xemul@parallels.com (Pavel Emelyanov),
	fweisbec@gmail.com (Frederic Weisbecker),
	mingo@redhat.com (Ingo Molnar),
	a.p.zijlstra@chello.nl (Peter Zijlstra),
	linux-kernel@vger.kernel.org
Subject: Re: prctl(PR_SET_MM)
Date: Tue, 19 Feb 2013 03:33:59 +1100 (EST)	[thread overview]
Message-ID: <20130218163359.25760592076@miso.sublimeip.com> (raw)
In-Reply-To: <1361200876.23152.149.camel@gandalf.local.home>

Steven Rostedt wrote:

> On Mon, 2013-02-18 at 12:39 +1100, Amnon Shiloh wrote:
> > Hello,
> > 
> > The code in "kernel/sys.c" provides the "prctl(PR_SET_MM)" function,
> > which is the only way a process can set or modify the following 11
> > per-process fields:
> > 
> >  	start_code, end_code, start_data, end_data, start_brk, brk,
> >  	start_stack, arg_start, arg_end, env_start, env_end.
> > 
> > Being able to set those fields is important, even crucial,
> > for any conceivable user-level checkpointing software, as
> > well as for migrating processes between different computers.
> 
> You're saying that this is useful for code not needing a kernel with
> CHECKPOINT_RESTORE enabled. Correct?

Correct, this is an important feature that is useful for a whole
general class of applications, not only those needing CHECKPOINT_RESTORE.

Had this not been done as part of the CHECKPOINT_RESTORE project, it
would have certainly been done, sooner or later, by some other developers:
it just so happened that the CHECKPOINT_RESTORE people were the first to
(publically) fill this gap, but in fact this code in "kernel/sys.c" should
be general kernel code, not part of CHECKPOINT_RESTORE.

> 
> > 
> > Unfortunately, this code (essentially "prctl_set_mm()") is presently
> > enclosed in "#ifdef CONFIG_CHECKPOINT_RESTORE" which is configured
> > as "default n" in "init/Kconfig".  Many system-administrators who
> > may like to have a checkpoint/restore or process-migration facility,
> > but use standard pre-packaged kernels, find the requirement to
> > configure and compile their own non-standard kernel difficult or
> > too prohibitive.
> > 
> > Would it be possible to have this code enabled by default?
> > 
> > This could be done in one of 4 ways:
> > 1) Having CONFIG_CHECKPOINT_RESTORE enabled by default; or
> 
> Nope, that wont due. Kernel policy is to have things default n. Have an
> issue with a config, talk with the distribution you are dealing with.
> They set the policy of what configs get set for their kernels.

Yes, Randy Dunlap already raised this point, but I have no dealings with
any particular Linux distribution or the right connections to chase them
all, one by one - I develop generic software for the general Linux community,
that is intended to work distribution-independently.  Even if I had access
to all distributions, it may be hard to convince them to configure
CONFIG_CHECKPOINT_RESTORE as a whole since it contains so much other code.

BTW, Can anyone explain this policy of "have things default n"?
When I go over "init/Kconfig" or most other Kconfig's, I can
actually see lots of "default y".

> 
> > 2) Releasing this code from the "#ifdef CONFIG_CHECK_RESTORE"; or
> > 3) Placing this code within a different kernel-configuration option
> >    (say "CONFIG_BASIC_CHECKPOINTING") that is enabled by default; or
> > 4) Placing this code under a dual #if, so instead of:
> >    #ifdef CONFIG_CHECKPOINT_RESTORE
> > 	   have:
> >    #if defined(CONFIG_CHECKPOINT_RESTORE) || defined(CONFIG_BASIC_CHECKPOINTING)
> 
> One of the above 3 can probably be worked out.
> 
> -- Steve

Great!

Naturally I prefer option 2 (but the other two will do as well).

Thanks,
Amnon.

  reply	other threads:[~2013-02-18 16:34 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-09 18:29 [PATCH] arch_check_bp_in_kernelspace: fix the range check Oleg Nesterov
2012-11-09 18:30 ` Oleg Nesterov
2012-11-19 17:47   ` Oleg Nesterov
2012-11-19 18:25     ` Steven Rostedt
2012-11-20 10:33       ` u3557
2012-11-20 15:48       ` Oleg Nesterov
2012-11-20 15:55         ` Steven Rostedt
2012-11-20 18:32         ` Oleg Nesterov
2012-11-20 23:16           ` u3557
2012-11-21 14:16             ` Oleg Nesterov
2012-11-21 17:30               ` Amnon Shiloh
2012-11-22 16:12                 ` vdso && cr (Was: arch_check_bp_in_kernelspace: fix the range check) Oleg Nesterov
2012-11-22 20:57                   ` Pavel Emelyanov
2012-11-23  0:20                     ` vdso && cr (Was: arch_check_bp_in_kernelspace: fix the range Amnon Shiloh
2012-11-23 17:45                       ` Oleg Nesterov
2012-11-24 12:47                         ` Amnon Shiloh
2012-11-23 17:42                     ` vdso && cr (Was: arch_check_bp_in_kernelspace: fix the range check) Oleg Nesterov
2012-11-23  9:14                   ` arch_check_bp_in_kernelspace: fix the range check Amnon Shiloh
2012-11-23 16:33                     ` Oleg Nesterov
2012-11-23 17:05                       ` Oleg Nesterov
2012-11-24 14:14                         ` Amnon Shiloh
2012-11-24 13:45                       ` Amnon Shiloh
2012-11-25 22:55                         ` Oleg Nesterov
2012-11-25 23:48                           ` Amnon Shiloh
2012-12-02 19:30                             ` PTRACE_SYSCALL && vsyscall (Was: arch_check_bp_in_kernelspace: fix the range check) Oleg Nesterov
2012-12-02 23:54                               ` u3557
2012-12-04 17:59                                 ` Oleg Nesterov
2012-12-04 22:44                                   ` u3557
2013-01-08 17:08                                   ` Pedro Alves
2013-01-09 17:52                                     ` Oleg Nesterov
2013-01-10  6:54                                       ` u3557
2013-01-12 18:12                                         ` Oleg Nesterov
2013-01-14  2:31                                           ` u3557
2013-01-14 16:01                                             ` Oleg Nesterov
2013-02-18  1:39                                               ` prctl(PR_SET_MM) Amnon Shiloh
2013-02-18  5:44                                                 ` prctl(PR_SET_MM) Randy Dunlap
2013-02-18 15:21                                                 ` prctl(PR_SET_MM) Steven Rostedt
2013-02-18 16:33                                                   ` Amnon Shiloh [this message]
2013-02-18 19:49                                                     ` prctl(PR_SET_MM) Steven Rostedt
2013-02-19  6:25                                                       ` prctl(PR_SET_MM) Amnon Shiloh
2013-02-20  8:39                                                         ` prctl(PR_SET_MM) Cyrill Gorcunov
2013-02-20  9:38                                                           ` prctl(PR_SET_MM) Amnon Shiloh
2013-02-20 10:51                                                             ` prctl(PR_SET_MM) Cyrill Gorcunov
2013-02-20 11:16                                                               ` prctl(PR_SET_MM) Amnon Shiloh
2013-02-21  7:46                                                               ` prctl(PR_SET_MM) Amnon Shiloh
2013-02-21  8:00                                                                 ` prctl(PR_SET_MM) Cyrill Gorcunov
2013-02-21  8:03                                                                   ` prctl(PR_SET_MM) Amnon Shiloh
2013-02-21  8:09                                                                     ` prctl(PR_SET_MM) Cyrill Gorcunov
2013-02-21 22:18                                                                   ` prctl(PR_SET_MM) Andrew Morton
2013-02-21 22:42                                                                     ` prctl(PR_SET_MM) Cyrill Gorcunov
2013-02-22  1:18                                                                     ` prctl(PR_SET_MM) Amnon Shiloh
2013-02-22 14:23                                                         ` prctl(PR_SET_MM) Denys Vlasenko
2012-12-05  9:29                               ` PTRACE_SYSCALL && vsyscall (Was: arch_check_bp_in_kernelspace: fix the range check) Jan Kratochvil
2012-12-05 13:14                                 ` u3557
2012-11-26  9:44                   ` vdso && cr " Cyrill Gorcunov
2012-11-26 12:27                     ` Andrey Wagin
2012-11-26 12:55                       ` Amnon Shiloh
2012-11-26 14:18                         ` Cyrill Gorcunov
2012-11-26 14:26                           ` vdso && cr (Was: arch_check_bp_in_kernelspace: fix the range Amnon Shiloh
2012-11-26 14:41                             ` vdso && cr Cyrill Gorcunov
     [not found] <20130222142603.987c6e3c.akpm@linux-foundation.org>
2013-02-24  6:24 ` prctl(PR_SET_MM) Amnon Shiloh
2013-02-24  6:28 ` prctl(PR_SET_MM) Amnon Shiloh

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=20130218163359.25760592076@miso.sublimeip.com \
    --to=u3557@miso.sublimeip.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=dvlasenk@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=gorcunov@openvz.org \
    --cc=jan.kratochvil@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=oleg@redhat.com \
    --cc=palves@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=u3557@dialix.com.au \
    --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).