Skip to contentSkip to conversation

mount namespace : who mounted what ?

DISCUSSION Daniel Lezcano 2 participants 3 messages Jun 3, 2010 – Jun 4, 2010

lore
Share & tools
lore
#0 lore raw

Hi all,

I was wondering, in a new mount namespace, if it is possible to know which mount points were inherited and which were mounted in a new namespace ?

I looked at /proc/<pid>/mountinfo and investigated a bit on the mount id, but this one is not reliable as it changes in the new namespace. The /proc/<pid>/mounts file shows all the mount points visible for the process inherited or not.

Any ideas ?

Thanks
-- Daniel

#1 lore raw
Quoted 10 lines · Daniel Lezcano

Hi all,

I was wondering, in a new mount namespace, if it is possible to know which mount points were inherited and which were mounted in a new namespace ?

I looked at /proc/<pid>/mountinfo and investigated a bit on the mount id, but this one is not reliable as it changes in the new namespace. The /proc/<pid>/mounts file shows all the mount points visible for the process inherited or not.

No more than "had it been this process that mmaped that area or was it inherited from the parent?"

#2 lore raw
Quoted 8 lines · Al Viro
Quoted 6 lines · Daniel Lezcano

Hi all,

I was wondering, in a new mount namespace, if it is possible to know which mount points were inherited and which were mounted in a new namespace ?

Quoted 8 lines
Quoted 5 lines

I looked at /proc/<pid>/mountinfo and investigated a bit on the mount id, but this one is not reliable as it changes in the new namespace. The /proc/<pid>/mounts file shows all the mount points visible for the process inherited or not.

No more than "had it been this process that mmaped that area or was it inherited from the parent?"

Ok, thanks.

I thought it may be interessting to add this information in the procfs (eg. /proc/<pid>/mountprivate) but wrt your remark that should have no sense as, to be consistent, we should do the same for all kind of inherited resources.