Re: prctl(PR_SET_MM)

From: Cyrill Gorcunov
Date: Thu Feb 21 2013 - 17:43:08 EST

On Thu, Feb 21, 2013 at 02:18:41PM -0800, Andrew Morton wrote:
> On Thu, 21 Feb 2013 12:00:28 +0400
> Cyrill Gorcunov <gorcunov@xxxxxxxxxx> wrote:
> > From: Amnon Shiloh <u3557@xxxxxxxxxxxxxxxxxx>
> > Subject: prctl: Make PR_SET_MM being depend on own CONFIG_MM_FIELDS_SETTING
> >
> > ...
> >
> > Signed-off-by: Amnon Shiloh <u3557@xxxxxxxxxxxxxxxxxx>
> The "..." makes me sad.
> If/when this patch gets sent for real, please explain the reasons?
> AFAICT it permits the enabling of prctl(PR_SET_MM) in
> CONFIG_CHECKPOINT_RESTORE=n kernels. If that was indeed the intent,
> why?

Sorry for this "...", it was a draft version for Amnon, not for inclusion.
As far as I understand Amnon needs these prctl opcodes to be enabled by
default (but still turnable off in Kconfig if needed) for his minimal
c/r software, he do not need the whole c/r functionality (procfs map-files,
get-tid-address,kcmp and such). That is the idea if I understand correctly.

Quoting Amnon
| 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.

I personally don't mind if this code become y by default (it requires
cap-sys-resource capability granted anyway), but for normal c/r this
prctl opcodes only is not enough and CHECKPOINT_RESTORE should be set.
Thus, if people agree with enabling prctl extension by default I certainly
won't object.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at