Skip to content

make /proc/PID/*maps* namespace friendly

Oleg Nesterov linux-fsdevel lkml netdev 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2proc/maps: replace proc_maps_private->pid with "struct inode *inode"fs/proc/internal.h fs/proc/task_mmu.c fs/proc/task_nommu.c+5 -50 replies
2/2proc/maps: make vm_is_stack() logic namespace-friendlyfs/proc/task_mmu.c fs/proc/task_nommu.c include/linux/mm.h +1 more+51 -220 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH -mm 0/2] make /proc/PID/*maps* namespace friendly

Hello,

Lets continue the boring proc/maps cleanups.

Eric, I do agree that the tgid vs pid logic looks strange, but I didn't even try to change it. Let's at least fix the namespace problems first. This is minor, but it is shame that /proc/pid/maps still shows the pid from the global namespace. And this is preparation for the next change.

With this change the only user of proc_maps_private->task is hold_task_mempolicy/release_task_mempolicy. I believe this code is buggy and should die, but this needs the changes in mm/mempolicy.c.

After that we can kill priv->task. task_nommu.c can be updated right now, but it would be better to change it along with task_mmu.c (we have a small complication with -ESRCH).

Oleg.

 fs/proc/internal.h   |    2 +-
 fs/proc/task_mmu.c   |   29 +++++++++++++++++++++++------
 fs/proc/task_nommu.c |   25 ++++++++++++++++++++++---
 include/linux/mm.h   |    4 ++--
 mm/util.c            |   23 ++++++++---------------
 5 files changed, 56 insertions(+), 27 deletions(-)