c/r: prctl: drop VMA flags test on PR_SET_MM_ stack data assignment
authorCyrill Gorcunov <[email protected]>
Thu, 7 Jun 2012 21:21:12 +0000 (14:21 -0700)
committerLinus Torvalds <[email protected]>
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 <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Acked-by: Kees Cook <[email protected]>
Cc: Pavel Emelyanov <[email protected]>
Cc: Serge Hallyn <[email protected]>
Cc: KAMEZAWA Hiroyuki <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
kernel/sys.c