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  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 23 Aug 2011 09:12:10 +0800
From:	Yongqiang Yang <>
To:	Aditya Kali <>
Cc:	Jan Kara <>, "Ted Ts'o" <>,
	Ext4 Developers List <>
Subject: Re: attempt to fix race in bigalloc code path

On Tue, Aug 23, 2011 at 1:30 AM, Aditya Kali <> wrote:
> On Mon, Aug 22, 2011 at 6:54 AM, Yongqiang Yang <> wrote:
>> Hi,
>> I can not find the patch - attempt to fix race in bigalloc code path -
>> in the mailing list.
>> I don't think this patch can work.  set_buffers_da_mapped() is called
>> under i_data_sem, so it can not lock page.  If the page is not locked,
>> calling page_has_buffers() is not secure as Jan pointed out
>> previously.  If a page is partially mapped(block size < page size),
>> setting BH_Da_Mapped without locking page is not safe too.
> The BH_Da_Mapped is set only during page writeback when the page is
> locked (in write_cache_pages_da). So, the setting of BH_Da_Mapped
> should be safe, no ?
Sorry for noise and thank you for your explanation, you are right.
IMHO, we can clear BH_Delayed and set BH_Mapped instead.

>> BTW:  find_delalloc_range() does not lock page as ext4_fiemap_cb().
>> As Jan said, it can crash system.  BUT we can not lock page in both
>> scenarios, because i_data_sem is hold. So delayed extent list is
>> necessary.  I have finished the code implementing delayed extent list,
>> which needs some further testing.
>> What are your opinions?
> I agree that having a delayed extent list will greatly simply this
> solution in this case.
>> --
>> Best Wishes
>> Yongqiang Yang

Best Wishes
Yongqiang Yang
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists