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]
Date:	Tue, 22 Sep 2009 12:07:37 +0100
From:	Al Viro <viro@...IV.linux.org.uk>
To:	Fernando Luis V?zquez Cao <fernando@....ntt.co.jp>
Cc:	Christoph Hellwig <hch@....de>, t-sato@...jp.nec.com,
	m-hamaguchi@...jp.nec.com,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Eric Sandeen <sandeen@...hat.com>
Subject: Re: [PATCH 3/4] Do not allow umounting of frozen filesystems

On Thu, Aug 27, 2009 at 11:06:07PM +0900, Fernando Luis V?zquez Cao wrote:
> Instead of making umount users wait until the filesystem is
> unfreezed return EBUSY, which is very convenient in HA
> configurations.
>
> This could have been implemented at a lower level but it would
> require considerable plumbing in functions such as release_mounts
> which do not return errors.

> +	if (sb->s_bdev != NULL) {
> +		mutex_lock(&sb->s_bdev->bd_fsfreeze_mutex);
> +		if (sb->s_frozen != SB_UNFROZEN) {
> +			mutex_unlock(&sb->s_bdev->bd_fsfreeze_mutex);
> +			return -EBUSY;
> +		}
> +	}

NAK.  First of all, it _partially_ breaks umount -l for no good reason.
If the first fs on the mountpoint is frozen, we fail; if it's deeper
we succeed just fine (and delay actual fs shutdown until the thaw).

As far as I can see, the real problem is that fsthaw ioctl has braindead
API; it takes some opened file on fs in question.  Why not do a bdev
ioctl instead?  Then we could let umount go ahead just fine, leaving
fs frozen (and not shut down until it thaws).  And whoever does thaw
(via bdev ioctl) will automatically trigger the actual fs shutdown.
Just with Christoph's pair of patches...

IOW, I'd rather add two new ioctls (check if frozen/thaw), both by
bdev.  On top of the first two patches in this set.

Comments?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ