Re: [PATCH RFC v3 35/36] kmsan: ext4: skip block merging logic in ext4_mpage_readpages for KMSAN

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 3, 2019 at 3:22 PM Marco Elver <elver@xxxxxxxxxx> wrote:
>
> On Fri, 22 Nov 2019 at 12:28, <glider@xxxxxxxxxx> wrote:
> >
> > KMSAN doesn't allow treating adjacent memory pages as such, if they were
> > allocated by different alloc_pages() calls.
> > ext4_mpage_readpages() however does so: adjacent pages end up being passed
> > together to dma_direct_map_sg().
> > To prevent this, jump directly to the buffer_head-based read function in
> > KMSAN builds.
> >
> > Signed-off-by: Alexander Potapenko <glider@xxxxxxxxxx>
> > Cc: "Theodore Ts'o" <tytso@xxxxxxx>
> > Cc: Andreas Dilger <adilger.kernel@xxxxxxxxx>
> > Cc: Vegard Nossum <vegard.nossum@xxxxxxxxxx>
> > Cc: Dmitry Vyukov <dvyukov@xxxxxxxxxx>
> > Cc: linux-mm@xxxxxxxxx
> > ---
> >
> > Change-Id: I54ae8af536626a988e6398ff18a06c179b0ce034
> > ---
> >  fs/ext4/readpage.c | 11 +++++++++++
> >  1 file changed, 11 insertions(+)
> >
> > diff --git a/fs/ext4/readpage.c b/fs/ext4/readpage.c
> > index a30b203fa461..a3bb9e3ce5de 100644
> > --- a/fs/ext4/readpage.c
> > +++ b/fs/ext4/readpage.c
> > @@ -252,6 +252,17 @@ int ext4_mpage_readpages(struct address_space *mapping,
> >                 if (page_has_buffers(page))
> >                         goto confused;
> >
> > +#if defined(CONFIG_KMSAN)
>
> Prefer 'if (IS_ENABLED(CONFIG_KMSAN))'.
Done in v4.
> Thanks,
> -- Marco



-- 
Alexander Potapenko
Software Engineer

Google Germany GmbH
Erika-Mann-Straße, 33
80636 München

Geschäftsführer: Paul Manicle, Halimah DeLaine Prado
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux