public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: Phillip Susi <psusi@ubuntu.com>
Cc: util-linux@vger.kernel.org
Subject: Re: read only bind mount ignores ready only
Date: Wed, 11 Dec 2013 17:49:30 +0100	[thread overview]
Message-ID: <20131211164930.GC16572@x2.net.home> (raw)
In-Reply-To: <52A878C5.6050505@ubuntu.com>

On Wed, Dec 11, 2013 at 09:37:57AM -0500, Phillip Susi wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Forwarding report from
> https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/712892
> 
> It seems that the kernel has a bug where it silently ignores the
> MS_RDONLY flag when creating a bind mount.  mount issues a warning

Yes, this is known issue.

> that the mount point appears to be read-write even though you

I think that libmount based mount does not warn about it (mistake?).

> requested read only.  The reporter suggests a patch to automatically
> attempt to remount with MS_RDONLY before issuing this warning to work
> around the kernel bug.  What do you think?

Well, it means that the kernel disadvantage will never be fixed ;-)

It would be relatively simple to fix it, because libmount already
support "additional mounts" to implement things like

   mount --make-private /dev/sda1 /mnt

(kernel does not allow to use propagation flags for regular mount
 operation). I'll try it tomorrow.

The problem is that all these userspace hacks does not atomic...

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

  reply	other threads:[~2013-12-11 16:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-11 14:37 read only bind mount ignores ready only Phillip Susi
2013-12-11 16:49 ` Karel Zak [this message]
2013-12-12 12:05 ` Karel Zak
2013-12-12 14:59   ` Phillip Susi
2013-12-12 16:02     ` Karel Zak
2013-12-12 19:42   ` Miklos Szeredi
2013-12-12 21:53     ` Al Viro
2013-12-13 10:45       ` Karel Zak
2013-12-13  8:18     ` Karel Zak

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=20131211164930.GC16572@x2.net.home \
    --to=kzak@redhat.com \
    --cc=psusi@ubuntu.com \
    --cc=util-linux@vger.kernel.org \
    /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