Re: [RFC][PATCH 00/20] Mount writer count and read-only bind mounts (v2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jun 17, 2006 at 11:36:35AM +0200, Jan Engelhardt wrote:
> >> >I assume you're talking about this kind of situation:
> >> >
> >> >mount --bind /local/writable/dir /chroot/untrusted/area/
> >> >mount --o remount,ro /chroot/untrusted/area/
> >> 
> >> Well, actually about some kind of VPS: openvz or something like that.
> >> But yes, this is the same kind of scenario.
> >
> >yes, Linux-VServer provides this kind of ro --bind mounts
> >without the race, as the the flags are passed on the actual
> >mount
> >
> >> >This has no r/w window in the chroot area:
> >> >
> >> >mount --bind /local/writable/dir /tmp/area/
> >> >mount --o remount,ro /tmp/area/
> >> >mount --bind /tmp/area/ /chroot/untrusted/area/
> >> >umount /tmp/area/
> >> 
> >> Well, it looks a little scarry and complicated at first. And probably
> >> requires you to know that semantic of --bind lets you do the last
> >> unmount. But if you are saying that this makes kernel smaller, faster
> >> and less buggy then you are probably very right.
> >
> >well, it makes the kernel more consistant in it's behaviour,
> >because especially for --rbind mounts, the logic what is
> >changed where and when is not as well defined as one would
> >wish ...
> >
> >btw, you could get the same result by simply doing:
> >
> >mount --bind /local/writable/dir /tmp/area/
> >mount --o remount,ro /tmp/area/
> >mount --move /tmp/area/ /chroot/untrusted/area/
> >
> 
> Just a nitpick, you all use "--o" ... :)
> mount: option `--o' is ambiguous

sorry, copy paste error on my side :)
(probably for Dave too ...)

best,
Herbert

> Jan Engelhardt
> -- 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux