and do following test:
- gcc -o mntns mntns.c
- the run with $ sudo ./mntns
- secret_dir='mktemp -d --tmpdir=/tmp'
- mount -n -o size=1m -t tmpfs tmpfs $secret_dir
- df -h , show it includes the tmpdir created in step 3, /tmp/tmp.sFsCzTDhjE
- open another shell console, run df -h, it also includes /tmp/tmp.sFsCzTDhjE
So it seems the CLONE_NEWNS can not make mounts isolated, still can be seen in other mount namespace. Could someone helped this question ? Searched a lots of examples, they just tried this, but not talked about this issue.