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: <20090422132451.62A4.A69D9226@jp.fujitsu.com>
Date:	Wed, 22 Apr 2009 13:49:21 +0900 (JST)
From:	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
To:	Eric Sandeen <sandeen@...hat.com>
Cc:	kosaki.motohiro@...fujitsu.com,
	linux-fsdevel <linux-fsdevel@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Rik van Riel <riel@...hat.com>
Subject: Re: [PATCH, RFC] check for frozen filesystems in the mmap path

> > 2. this logic kill multi thread application.
> > 
> > this logic mean mmap_sem grabbing until unfreeze.
> > it mean othrer thread in the same process can't page-fault although
> > it don't touch frozen-sb.
> > it seems strange.
> 
> Hm, I hadn't thought about this ... On the one hand, ->page_mkwrite can
> already sleep, though a userspace freeze/unfreeze could potentially take
> much much longer.  freeze/unfreeze *should* happen very quickly, but
> nothing enforces that.
> 
> Do you have any suggestions?

One more comment.

I read ioctl_fsfreeze() and freeze_bdev(), it call __fsync_super().
Oh, I don't think __fsync_suepr is very quick.

So, page-fault have one unique characteristics.
if page-fault return 0 without pte change, page-fault is occur again soon.
then, if you need long time waiting, I think you can use following technique.

	unlock mmap_sem
	wait long-time
	lock mmap_sem
	goto out;


it cause page-fault counter increment twice unintesionally.
but no problem. fs-freeze is not freqently event.

Am I missing anything?



--
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