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]
Message-Id: <2D335332-2BFB-4F69-ACA2-3CE5EC5BD494@linux.dev>
Date:   Sun, 20 Nov 2022 12:03:52 +0800
From:   Muchun Song <muchun.song@...ux.dev>
To:     Mike Kravetz <mike.kravetz@...cle.com>
Cc:     Linux Memory Management List <linux-mm@...ck.org>,
        linux-kernel@...r.kernel.org,
        Andrew Morton <akpm@...ux-foundation.org>,
        Muchun Song <songmuchun@...edance.com>,
        Joao Martins <joao.m.martins@...cle.com>,
        Matthew Wilcox <willy@...radead.org>,
        Michal Hocko <mhocko@...e.com>, Peter Xu <peterx@...hat.com>,
        Miaohe Lin <linmiaohe@...wei.com>,
        Oscar Salvador <osalvador@...e.de>,
        Naoya Horiguchi <naoya.horiguchi@....com>,
        Vlastimil Babka <vbabka@...nel.org>,
        Sidhartha Kumar <sidhartha.kumar@...cle.com>,
        "Aneesh Kumar K . V" <aneesh.kumar@...ux.ibm.com>
Subject: Re: [PATCH] hugetlb: Fix __prep_compound_gigantic_page page flag
 setting



> On Nov 19, 2022, at 03:52, Mike Kravetz <mike.kravetz@...cle.com> wrote:
> 
> Commit 2b21624fc232 ("hugetlb: freeze allocated pages before creating
> hugetlb pages") changed the order page flags were cleared and set in the
> head page.  It moved the __ClearPageReserved after __SetPageHead.
> However, there is a check to make sure __ClearPageReserved is never
> done on a head page.  If CONFIG_DEBUG_VM_PGFLAGS is enabled, the
> following BUG will be hit when creating a hugetlb gigantic page:
> 
>    page dumped because: VM_BUG_ON_PAGE(1 && PageCompound(page))
>    ------------[ cut here ]------------
>    kernel BUG at include/linux/page-flags.h:500!
>    Call Trace will differ depending on whether hugetlb page is created
>    at boot time or run time.
> 
> Make sure to __ClearPageReserved BEFORE __SetPageHead.
> 
> Reported-by: Aneesh Kumar K.V <aneesh.kumar@...ux.ibm.com>
> Fixes: 2b21624fc232 ("hugetlb: freeze allocated pages before creating hugetlb pages")
> Signed-off-by: Mike Kravetz <mike.kravetz@...cle.com>

Acked-by: Muchun Song <songmuchun@...edance.com>

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ