From: Johan Hovold <johan@kernel.org>
To: Christian Brauner <brauner@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Anton Altaparmakov <anton@tuxera.com>,
Konstantin Komarov <almaz.alexandrovich@paragon-software.com>,
Linux regressions mailing list <regressions@lists.linux.dev>,
"Matthew Wilcox (Oracle)" <willy@infradead.org>,
Namjae Jeon <linkinjeon@kernel.org>,
"ntfs3@lists.linux.dev" <ntfs3@lists.linux.dev>,
Linux FS-devel Mailing List <linux-fsdevel@vger.kernel.org>,
"linux-ntfs-dev@lists.sourceforge.net"
<linux-ntfs-dev@lists.sourceforge.net>
Subject: Re: [PATCH 2/2] ntfs3: remove warning
Date: Tue, 16 Apr 2024 14:55:42 +0200 [thread overview]
Message-ID: <Zh51TvFSlXhTGPJy@hovoldconsulting.com> (raw)
In-Reply-To: <20240416-genutzt-bestleistung-f76707a9ddba@brauner>
On Tue, Apr 16, 2024 at 12:38:56PM +0200, Christian Brauner wrote:
> On Mon, Apr 15, 2024 at 06:06:03PM +0200, Johan Hovold wrote:
> > Ah, right, I forgot about CONFIG_NTFS_RW as I've never enabled it.
> >
> > Judging from the now removed Kconfig entry perhaps not that many people
> > did:
> >
> > The only supported operation is overwriting existing files,
> > without changing the file length. No file or directory
> > creation, deletion or renaming is possible.
> >
> > but I guess it still makes my argument above mostly moot.
> >
> > At least if we disable write support in ntfs3 by default for now...
>
> I think we can disable write support in ntfs3 for now. I've picked up
> the patch to make ntfs3 serve I sent some time ago that Johan tested
> now.
Note that I actually meant that write support should be disabled
completely in ntfs3 for now.
After this first encounter I have zero confidence in that driver and
pushing people towards using it (by removing the old, read-only one) is
just gonna result in further corrupted filesystems. At least make sure
it can't modify anything by default and mark write-support as
experimental and broken or something as that's apparently what it is.
> The only thing left is to disable write support for ntfs3 as legacy ntfs
> driver for now. I took a stab at this. The following two patches
> I'm appending _should_ be enough iiuc. Johan, please take a look and
> please test.
I skimmed them and gave them a quick spin. It seems that not specifying
either "ro" or "rw" in fstab now results in a ro mount, but I can still
specify "rw" explicitly (in fstab or command line) and end up with:
/dev/nvme0n1p3 on /mnt/windows type ntfs (rw,relatime,uid=0,gid=0,iocharset=iso8859-1)
For obvious reasons, I did not dare listing the root directory or write
anything, but it looks like it's not read-only.
Using just my naive temporary hack from yesterday:
diff --git a/fs/ntfs3/super.c b/fs/ntfs3/super.c
index 8d2e51bae2cb..26be6c6d1032 100644
--- a/fs/ntfs3/super.c
+++ b/fs/ntfs3/super.c
@@ -1177,6 +1177,9 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc)
sb->s_xattr = ntfs_xattr_handlers;
sb->s_d_op = options->nocase ? &ntfs_dentry_ops : NULL;
+ ntfs_warn(sb, "ntfs3 driver is broken, mounting read only");
+ sb->s_flags |= SB_RDONLY;
+
options->nls = ntfs_load_nls(options->nls_name);
if (IS_ERR(options->nls)) {
options->nls = NULL;
seems to prevent also explicit rw mounts (but judging from your patches
it is not necessarily sufficient to prevent all modifications).
Johan
next prev parent reply other threads:[~2024-04-16 12:55 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-15 7:20 [PATCH] fs: Remove NTFS classic Matthew Wilcox (Oracle)
2024-01-15 11:00 ` Anton Altaparmakov
2024-01-15 11:08 ` Enrico Mioso
2024-01-15 11:41 ` Namjae Jeon
2024-01-15 14:49 ` Matthew Wilcox
2024-01-16 9:52 ` [PATCH] " Anton Altaparmakov
2024-01-15 22:20 ` [PATCH] fs: " Dave Chinner
2024-01-16 9:33 ` Christian Brauner
2024-01-16 9:51 ` [PATCH] " Anton Altaparmakov
2024-01-16 11:06 ` Christian Brauner
2024-01-16 11:32 ` Anton Altaparmakov
2024-03-22 16:35 ` [PATCH] fs: " Johan Hovold
2024-03-25 8:28 ` Christian Brauner
2024-03-25 8:34 ` [PATCH 1/2] ntfs3: serve as alias for the legacy ntfs driver Christian Brauner
2024-03-25 10:09 ` Johan Hovold
2024-03-25 12:01 ` Christian Brauner
2024-03-25 8:34 ` [PATCH 2/2] ntfs3: remove warning Christian Brauner
2024-03-25 10:12 ` Johan Hovold
2024-03-25 12:05 ` Christian Brauner
2024-04-04 8:06 ` Linux regression tracking (Thorsten Leemhuis)
2024-04-11 11:03 ` Konstantin Komarov
2024-04-15 9:54 ` Johan Hovold
2024-04-15 10:20 ` Johan Hovold
2024-04-15 11:32 ` Anton Altaparmakov
2024-04-15 11:42 ` Johan Hovold
2024-04-15 14:15 ` Christian Brauner
2024-04-15 15:23 ` Linus Torvalds
2024-04-15 15:27 ` Matthew Wilcox
2024-04-15 15:47 ` Johan Hovold
2024-04-15 15:51 ` Linus Torvalds
2024-04-15 16:06 ` Johan Hovold
2024-04-16 10:38 ` Christian Brauner
2024-04-16 12:55 ` Johan Hovold [this message]
2024-04-17 16:07 ` Konstantin Komarov
2024-04-18 6:36 ` Johan Hovold
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=Zh51TvFSlXhTGPJy@hovoldconsulting.com \
--to=johan@kernel.org \
--cc=almaz.alexandrovich@paragon-software.com \
--cc=anton@tuxera.com \
--cc=brauner@kernel.org \
--cc=linkinjeon@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-ntfs-dev@lists.sourceforge.net \
--cc=ntfs3@lists.linux.dev \
--cc=regressions@lists.linux.dev \
--cc=torvalds@linux-foundation.org \
--cc=willy@infradead.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