lkml.org 
[lkml]   [2023]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2023-09-18 12:24    [W:0.039 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site