[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZQgkXWy2UTgDf2gU@li-bb2b2a4c-3307-11b2-a85c-8fa5c3a69313.ibm.com>
Date: Mon, 18 Sep 2023 15:50:13 +0530
From: Ojaswin Mujoo <ojaswin@...ux.ibm.com>
To: Jan Kara <jack@...e.cz>
Cc: linux-ext4@...r.kernel.org, "Theodore Ts'o" <tytso@....edu>,
Ritesh Harjani <ritesh.list@...il.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/1] ext4: Mark buffer new if it is unwritten to avoid
stale data exposure
Hi Jan,
Thanks for the review!
On Mon, Sep 18, 2023 at 09:26:09AM +0200, Jan Kara wrote:
> On Sat 16-09-23 16:12:13, Ojaswin Mujoo wrote:
> > ** Short Version **
> >
> > In ext4 with dioread_nolock, we could have a scenario where the bh returned by
> > get_blocks (ext4_get_block_unwritten()) in __block_write_begin_int() has
> > UNWRITTEN and MAPPED flag set. Since such a bh does not have NEW flag set we
> > never zero out the range of bh that is not under write, causing whatever stale
> > data is present in the folio at that time to be written out to disk. To fix this
> > mark the buffer as new in ext4_get_block_unwritten(), in case it is unwritten.
> >
> > -----
>
> I'm not sure if this separator isn't going to confuse some tools processing
> patches ;)
Oh no, my bad :/ Let me quickly send a v3 to fix this. Thanks for
pointing it out.
Regards,
ojaswin
Powered by blists - more mailing lists