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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 18 Sep 2023 10:09:00 -0400
From:   Johannes Weiner <hannes@...xchg.org>
To:     Vlastimil Babka <vbabka@...e.cz>
Cc:     Mike Kravetz <mike.kravetz@...cle.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Mel Gorman <mgorman@...hsingularity.net>,
        Miaohe Lin <linmiaohe@...wei.com>,
        Kefeng Wang <wangkefeng.wang@...wei.com>,
        Zi Yan <ziy@...dia.com>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2 0/6] mm: page_alloc: freelist migratetype hygiene

On Mon, Sep 18, 2023 at 09:07:53AM +0200, Vlastimil Babka wrote:
> On 9/15/23 16:16, Johannes Weiner wrote:
> > On Thu, Sep 14, 2023 at 04:52:38PM -0700, Mike Kravetz wrote:
> >> In next-20230913, I started hitting the following BUG.  Seems related
> >> to this series.  And, if series is reverted I do not see the BUG.
> >> 
> >> I can easily reproduce on a small 16G VM.  kernel command line contains
> >> "hugetlb_free_vmemmap=on hugetlb_cma=4G".  Then run the script,
> >> while true; do
> >>  echo 4 > /sys/kernel/mm/hugepages/hugepages-1048576kB/nr_hugepages
> >>  echo 4 > /sys/kernel/mm/hugepages/hugepages-1048576kB/demote
> >>  echo 0 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
> >> done
> >> 
> >> For the BUG below I believe it was the first (or second) 1G page creation from
> >> CMA that triggered:  cma_alloc of 1G.
> >> 
> >> Sorry, have not looked deeper into the issue.
> > 
> > Thanks for the report, and sorry about the breakage!
> > 
> > I was scratching my head at this:
> > 
> >                         /* MIGRATE_ISOLATE page should not go to pcplists */
> >                         VM_BUG_ON_PAGE(is_migrate_isolate(mt), page);
> > 
> > because there is nothing in page isolation that prevents setting
> > MIGRATE_ISOLATE on something that's on the pcplist already. So why
> > didn't this trigger before already?
> > 
> > Then it clicked: it used to only check the *pcpmigratetype* determined
> > by free_unref_page(), which of course mustn't be MIGRATE_ISOLATE.
> > 
> > Pages that get isolated while *already* on the pcplist are fine, and
> > are handled properly:
> > 
> >                         mt = get_pcppage_migratetype(page);
> > 
> >                         /* MIGRATE_ISOLATE page should not go to pcplists */
> >                         VM_BUG_ON_PAGE(is_migrate_isolate(mt), page);
> > 
> >                         /* Pageblock could have been isolated meanwhile */
> >                         if (unlikely(isolated_pageblocks))
> >                                 mt = get_pageblock_migratetype(page);
> > 
> > So this was purely a sanity check against the pcpmigratetype cache
> > operations. With that gone, we can remove it.
> 
> Agreed, I assume you'll fold it in 1/6 in v3.

Yes, will do.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ