]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
c/r: prctl: drop VMA flags test on PR_SET_MM_ stack data assignment
authorCyrill Gorcunov <gorcunov@gmail.com>
Thu, 7 Jun 2012 21:21:12 +0000 (14:21 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 7 Jun 2012 21:43:55 +0000 (14:43 -0700)
commit736f24d5e59d699c6e300c5da7e3bb882eddda67
tree9f703433c67763623bacb6ec1aab5a69d33903ac
parent300f786b2683f8bb1ec0afb6e1851183a479c86d
c/r: prctl: drop VMA flags test on PR_SET_MM_ stack data assignment

In commit b76437579d13 ("procfs: mark thread stack correctly in
proc/<pid>/maps") the stack allocated via clone() is marked in
/proc/<pid>/maps as [stack:%d] thus it might be out of the former
mm->start_stack/end_stack values (and even has some custom VMA flags
set).

So to be able to restore mm->start_stack/end_stack drop vma flags test,
but still require the underlying VMA to exist.

As always note this feature is under CONFIG_CHECKPOINT_RESTORE and
requires CAP_SYS_RESOURCE to be granted.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Acked-by: Kees Cook <keescook@chromium.org>
Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: Serge Hallyn <serge.hallyn@canonical.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/sys.c