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]
Message-ID: <CAMZfGtUbX+TAx-7RJ4ZpoNLHDa9mp6k+DBqHaYiLjhSJokh3Sw@mail.gmail.com>
Date:   Tue, 6 Jul 2021 10:32:56 +0800
From:   Muchun Song <songmuchun@...edance.com>
To:     Wang Qing <wangqing@...o.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Linux Memory Management List <linux-mm@...ck.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [Phishing Risk] [External] [PATCH] mm: add GFP_ATOMIC flag after local_lock_irqsave

On Mon, Jul 5, 2021 at 9:57 PM Wang Qing <wangqing@...o.com> wrote:
>
> Use GFP_ATOMIC when local_lock_irqsave in __alloc_pages_bulk
>
> Reported-by: syzbot+e45919db2eab5e837646@...kaller.appspotmail.com
> Signed-off-by: Wang Qing <wangqing@...o.com>
> ---
>  mm/page_alloc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index d6e94cc..3016ba5
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -5309,7 +5309,7 @@ unsigned long __alloc_pages_bulk(gfp_t gfp, int preferred_nid,
>                 }
>                 nr_account++;
>
> -               prep_new_page(page, 0, gfp, 0);
> +               prep_new_page(page, 0, gfp | GFP_ATOMIC, 0);

Hi Wang Qing,

I didn't get the point here. IIUC, prep_new_page() will not allocate
memory. So why do we need GFP_ATOMIC? What I missed here?

Thanks.

>                 if (page_list)
>                         list_add(&page->lru, page_list);
>                 else
> --
> 2.7.4
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ