From: "Arkadiusz Miśkiewicz" <a.miskiewicz@gmail.com>
To: Vasiliy Kulikov <segooon@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: 3.3 and hidepid feature problem - options not always applied at mount
Date: Thu, 22 Mar 2012 09:03:15 +0100 [thread overview]
Message-ID: <201203220903.15360.a.miskiewicz@gmail.com> (raw)
Hi,
I'm trying to use hidepid feature in 3.3 kernel but I'm getting weird
things like options not being applied _sometimes_ at mount.
[@ ~]# cat /proc/mounts
sh: cat: /proc/mounts: No such file or directory
[@ ~]# strace -e mount -f -F -s 200 mount none /proc -t proc -o hidepid=2,gid=17
mount("none", "/proc", "proc", MS_MGC_VAL, "hidepid=2,gid=17") = 0
[@ ~]# cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/sda3 / xfs rw,relatime,attr2,noquota 0 0
run /run tmpfs rw,relatime 0 0
none /proc proc rw,relatime 0 0
No hidepid, no gid - huh?
[@ ~]# mount /proc -o remount,hidepid=2,gid=17
[@ ~]# cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/sda3 / xfs rw,relatime,attr2,noquota 0 0
run /run tmpfs rw,relatime 0 0
none /proc proc rw,relatime,gid=17,hidepid=2 0 0
remount and hidepid/gid is there
[@ ~]# umount /proc
[@ ~]# strace -e mount -f -F -s 200 mount none /proc -t proc -o hidepid=2,gid=17
mount("none", "/proc", "proc", MS_MGC_VAL, "hidepid=2,gid=17") = 0
[@ ~]# cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/sda3 / xfs rw,relatime,attr2,noquota 0 0
run /run tmpfs rw,relatime 0 0
none /proc proc rw,relatime,gid=17,hidepid=2 0 0
and now I'm lost - every new umount & mount gets hidepid/gid right.
Any ideas why initial mount fails to get hidepid/gid options applied?
The syscall seems correct.
--
Arkadiusz Miśkiewicz PLD/Linux Team
arekm / maven.pl http://ftp.pld-linux.org/
next reply other threads:[~2012-03-22 8:03 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-22 8:03 Arkadiusz Miśkiewicz [this message]
2012-03-23 17:10 ` [PATCH] proc: fix mount -t proc -o AAA Vasiliy Kulikov
2012-03-23 18:45 ` Arkadiusz Miśkiewicz
2012-03-23 19:18 ` Vasiliy Kulikov
2012-03-23 23:15 ` Andrew Morton
2012-03-25 7:24 ` Arkadiusz Miśkiewicz
2012-03-25 15:36 ` Vasiliy Kulikov
2012-03-25 17:40 ` Arkadiusz Miśkiewicz
2012-03-25 17:49 ` Vasiliy Kulikov
2012-03-25 22:23 ` Valdis.Kletnieks
2012-03-26 22:37 ` Andrew Morton
2012-03-31 13:55 ` [PATCH] proc: reset mount options after the last procfs umount Vasiliy Kulikov
2012-03-31 14:19 ` Arkadiusz Miśkiewicz
2012-03-31 15:20 ` Vasiliy Kulikov
2012-03-31 15:31 ` Arkadiusz Miśkiewicz
2012-03-31 15:46 ` Vasiliy Kulikov
2012-03-26 22:35 ` [PATCH] proc: fix mount -t proc -o AAA Andrew Morton
2012-03-25 15:27 ` Vasiliy Kulikov
2012-03-31 13:51 ` Vasiliy Kulikov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201203220903.15360.a.miskiewicz@gmail.com \
--to=a.miskiewicz@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=segooon@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox