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: <CAGBYx2ZKn89qeGR-mbNyF6--DEtRjsm5ijRU9TW1zEVQAh+DoQ@mail.gmail.com>
Date:	Thu, 1 Sep 2011 09:10:06 +0800
From:	Yongqiang Yang <xiaoqiangnk@...il.com>
To:	Allison Henderson <achender@...ux.vnet.ibm.com>
Cc:	linux-kernel@...r.kernel.org,
	Ext4 Developers List <linux-ext4@...r.kernel.org>,
	Andreas Dilger <adilger@...ger.ca>
Subject: Re: lock i_mutex for fallocate?

Hi Allison,

there are races between read and punch hole too.  After pages are
released and before punch hole hold i_data_sem, a page can be mapped
by read, then write can be done on the page.

Maybe we should separate punch hole from fallocate, and solve the
races in vfs layer.

Yongqiang.
On Thu, Sep 1, 2011 at 8:33 AM, Allison Henderson
<achender@...ux.vnet.ibm.com> wrote:
> Hi All,
>
> In ext4 punch hole, we realized that the punch hole operation needs to be
> done under i_mutex just like truncate.  i_mutex for truncate is held in the
> vfs layer, so we dont need to lock it at the file system layer, but vfs does
> not lock i_mutex for fallocate.  We can lock i_mutex for fallocate at the fs
> layer, but question was raised then: should i_mutex for fallocate be held in
> the vfs layer instead?  I do not know if other file systems need i_mutex to
> be locked for fallocate, or if they might be locking it already, so I am
> doing some investigating on this idea, and also the appropriate use of
> i_mutex in general.  Can someone provide some insight this topic?  Thx!
>
> Allison Henderson
> --
> 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/
>



-- 
Best Wishes
Yongqiang Yang
--
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