Re: [lxc-devel] [PATCH 1/4] Automatic mounts: improvements for /proc and /sys

2013-09-27 Thread Christian Seiler
Hi Serge, > My 3.2, 3.8 and 3.11 kernels all behave the same: > > serge@sergeh1:~$ sudo mount -t tmpfs tmpfs /mnt > serge@sergeh1:~$ sudo mount --bind /mnt /mnt2 > serge@sergeh1:~$ sudo mount -o remount,ro /mnt2 > serge@sergeh1:~$ sudo touch /mnt/a > serge@sergeh1:~$ mount | grep /mnt > tmpfs on /

Re: [lxc-devel] [PATCH 1/4] Automatic mounts: improvements for /proc and /sys

2013-09-26 Thread Serge Hallyn
Quoting Christian Seiler (christ...@iwakd.de): > No, previously, the kernel has behaved differently. As I said, > on my 3.2 and 2.6.32 a mount -o remount,ro /bindmount without > the bind option would only change the bind mount and not the > entire filesystem. My 3.2, 3.8 and 3.11 kernels all behav

Re: [lxc-devel] [PATCH 1/4] Automatic mounts: improvements for /proc and /sys

2013-09-26 Thread Christian Seiler
Hi Serge, >> Yes, I see what you mean, but this is definitely a change in the >> behaviour of the kernel compared to previous versions. And that >> also means that (see other thread) bind-mounting a rootfs onto >> itself will not prevent a container from remounting the filesystem >> readonly on sh

Re: [lxc-devel] [PATCH 1/4] Automatic mounts: improvements for /proc and /sys

2013-09-26 Thread Serge Hallyn
Quoting Christian Seiler (christ...@iwakd.de): > Hi Serge, > > >>+ /* Read-only bind-mounting... In older kernels, doing that > >>required > >>+* to do one MS_BIND mount and then MS_REMOUNT|MS_RDONLY the > >>same > >>+* one. According to mount(2) manpage, MS_BIND

Re: [lxc-devel] [PATCH 1/4] Automatic mounts: improvements for /proc and /sys

2013-09-26 Thread Christian Seiler
Hi Serge, >> +/* Read-only bind-mounting... In older kernels, doing that >> required >> + * to do one MS_BIND mount and then MS_REMOUNT|MS_RDONLY the >> same >> + * one. According to mount(2) manpage, MS_BIND honors MS_RDONLY >> from >> + * kernel

Re: [lxc-devel] [PATCH 1/4] Automatic mounts: improvements for /proc and /sys

2013-09-26 Thread Serge Hallyn
Quoting Christian Seiler (christ...@iwakd.de): ... > + /* Read-only bind-mounting... In older kernels, doing that > required > + * to do one MS_BIND mount and then MS_REMOUNT|MS_RDONLY the > same > + * one. According to mount(2) manpage, MS_BIND honors MS_RDO

[lxc-devel] [PATCH 1/4] Automatic mounts: improvements for /proc and /sys

2013-09-24 Thread Christian Seiler
Improve lxc.mount.auto code: allow the user to specify whether to mount certain things read-only or read-write. Also make the code much more easily extensible for the future. Signed-off-by: Christian Seiler --- src/lxc/conf.c| 144 + src/l