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] [day] [month] [year] [list]
Date:   Wed, 9 Mar 2022 14:40:41 -0800
From:   Minchan Kim <minchan@...nel.org>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     linux-mm <linux-mm@...ck.org>, LKML <linux-kernel@...r.kernel.org>,
        Chris Goldsworthy <cgoldswo@...eaurora.org>,
        Marcelo Tosatti <mtosatti@...hat.com>,
        John Dias <joaodias@...gle.com>
Subject: Re: [PATCH] mm: fs: fix lru_cache_disabled race in bh_lru

On Wed, Mar 09, 2022 at 02:06:27PM -0800, Andrew Morton wrote:
> On Tue,  8 Mar 2022 10:07:09 -0800 Minchan Kim <minchan@...nel.org> wrote:
> 
> > Check lru_cache_disabled under bh_lru_lock. Otherwise, it could
> > introduce race below and it fails to migrate pages containing
> > buffer_head.
> > 
> >    CPU 0					CPU 1
> > 
> > bh_lru_install
> >                                        lru_cache_disable
> >   lru_cache_disabled = false
> >                                        atomic_inc(&lru_disable_count);
> > 				       invalidate_bh_lrus_cpu of CPU 0
> > 				       bh_lru_lock
> > 				       __invalidate_bh_lrus
> > 				       bh_lru_unlock
> >   bh_lru_lock
> >   install the bh
> >   bh_lru_unlock
> 
> What are the user-visible runtime effects of this bug?

Once the race happens, CMA allocation fails, which is critical for
the workload CMA allocation depends.

> 
> Is a cc:stable needed?

Ah, missed it. I think it would be rare to trigger the race considering
how CMA allocation would be rare but once it happens, it makes the CMA
allocation failure, which is critical for some. And the patch size is
small enough so I think it's worth to add in the stable.

> 
> Should there be a reported-by?

I found it on my own while I reviewed Marcelo's other patchset so
I don't think we need to add my reported-by.

Andrew, please tell me if you want me resend it.

Powered by blists - more mailing lists