public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Jan Kara <jack@suse.cz>
Cc: JunChao Sun <sunjunchao2870@gmail.com>,
	Ext4 Developers List <linux-ext4@vger.kernel.org>
Subject: Re: A problem about BLK_OPEN_RESTRICT_WRITES
Date: Wed, 21 Feb 2024 16:46:26 -0500	[thread overview]
Message-ID: <20240221214626.GB633176@mit.edu> (raw)
In-Reply-To: <20240221161954.zwx34k5rvoevpe7o@quack3>

On Wed, Feb 21, 2024 at 05:19:54PM +0100, Jan Kara wrote:
> 
> No. Cases like above are the reason why there's still a config option
> CONFIG_BLK_DEV_WRITE_MOUNTED and it defaults to 'y'. We need to be fixing
> userspace - util-linux in this case - to avoid having writeable file handle
> open to block devices that are being mounted.

Note also that at least as far as ext4 is concerned, I don't recommend
that people use CONFIG_BLK_DEV_WRITE_MOUNTED on production systems.
This will break programs like tune2fs operating on mounted file
systems.  There is a plan to add super to allow various superblock
tuning operations to bet set via ioctls, much like the new ioctl's
which allow the label and uuid to be set via an ioctl.  This will
require users upgrade to newer kerrnels and newer versions of
e2fsprogs, so it will a while before we're at that point.

For now, the main use of CONFIG_BLK_DEV_WRITE_MOUNTED is to prevent
tools like syzbot from issuing false positives; I don't recommend that
it be used in other situations.

Cheers,

					- Ted

      reply	other threads:[~2024-02-21 21:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-21 15:29 A problem about BLK_OPEN_RESTRICT_WRITES JunChao Sun
2024-02-21 16:19 ` Jan Kara
2024-02-21 21:46   ` Theodore Ts'o [this message]

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=20240221214626.GB633176@mit.edu \
    --to=tytso@mit.edu \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sunjunchao2870@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