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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 30 May 2012 16:55:58 -0600
From:	Andreas Dilger <adilger@...mcloud.com>
To:	Ted Ts'o <tytso@....edu>
Cc:	Ext4 Developers List <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH] e2fsck: allow checking on mounted root filesystem

On 2012-05-30, at 12:39 PM, Andreas Dilger wrote:
> Commit 732e26b98e5c79a4298dbe341f43b54b354bb241 added checks to
> prevent e2fsck from being run in filesystem-modifying mode against
> a mounted or otherwise busy device, due to several bug reports of
> users doing this even with the verbose warnings in check_mount().
> 
> However, it also prevented e2fsck from checking a mounted root
> filesystem, which will prevent the node from booting.  Once again
> allow e2fsck to run against the mounted root filesystem.
> 
> Signed-off-by: Andreas Dilger <adilger@...mcloud.com>
> ---
> e2fsck/unix.c |    7 +++++--
> 1 files changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/e2fsck/unix.c b/e2fsck/unix.c
> index 6161e46..1c1bae8 100644
> --- a/e2fsck/unix.c
> +++ b/e2fsck/unix.c
> @@ -1221,8 +1221,11 @@ restart:
> 			    &old_bitmaps);
> 	if (!old_bitmaps)
> 		flags |= EXT2_FLAG_64BITS;
> -	if ((ctx->options & E2F_OPT_READONLY) == 0)
> -		flags |= EXT2_FLAG_RW | EXT2_FLAG_EXCLUSIVE;
> +	if ((ctx->options & E2F_OPT_READONLY) == 0) {
> +		flags |= EXT2_FLAG_RW;
> +		if (!(ctx->mount_flags & EXT2_MF_ISROOT))
> +			flags |= EXT2_FLAG_EXCLUSIVE;
> +	}

This should further exclude root filesystems that are not mounted
read-only.  Another patch on the way.

Cheers, Andreas
--
Andreas Dilger                       Whamcloud, Inc.
Principal Lustre Engineer            http://www.whamcloud.com/




--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ