lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <175798064776.350013.6744611652039454651.stgit@frogsfrogsfrogs>
Date: Mon, 15 Sep 2025 17:03:14 -0700
From: "Darrick J. Wong" <djwong@...nel.org>
To: tytso@....edu
Cc: linux-ext4@...r.kernel.org
Subject: [PATCH 1/2] fuse2fs: mount norecovery if main block device is
 readonly

From: Darrick J. Wong <djwong@...nel.org>

If the main block device is read-only, downgrade the mount to an ro
norecovery mount.  This will make generic/050 somewhat less grouchy.

Signed-off-by: "Darrick J. Wong" <djwong@...nel.org>
---
 misc/fuse2fs.c |    9 +++++++++
 1 file changed, 9 insertions(+)


diff --git a/misc/fuse2fs.c b/misc/fuse2fs.c
index 48473321f469dc..fb44b0a79b53e6 100644
--- a/misc/fuse2fs.c
+++ b/misc/fuse2fs.c
@@ -946,6 +946,15 @@ static errcode_t fuse2fs_open(struct fuse2fs *ff, int libext2_flags)
 
 	err = ext2fs_open2(ff->device, options, flags, 0, 0, unix_io_manager,
 			   &ff->fs);
+	if (err == EPERM) {
+		err_printf(ff, "%s.\n",
+			   _("read-only device, trying to mount norecovery"));
+		flags &= ~EXT2_FLAG_RW;
+		ff->ro = 1;
+		ff->norecovery = 1;
+		err = ext2fs_open2(ff->device, options, flags, 0, 0,
+				   unix_io_manager, &ff->fs);
+	}
 	if (err) {
 		err_printf(ff, "%s.\n", error_message(err));
 		err_printf(ff, "%s\n", _("Please run e2fsck -fy."));


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ