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: <Y6BUhXwswQTsfp0E@pc636>
Date:   Mon, 19 Dec 2022 13:09:41 +0100
From:   Uladzislau Rezki <urezki@...il.com>
To:     Lorenzo Stoakes <lstoakes@...il.com>
Cc:     linux-mm@...ck.org, Andrew Morton <akpm@...ux-foundation.org>,
        Uladzislau Rezki <urezki@...il.com>,
        Christoph Hellwig <hch@...radead.org>,
        linux-kernel@...r.kernel.org, Matthew Wilcox <willy@...radead.org>,
        Nicholas Piggin <npiggin@...il.com>,
        Baoquan He <bhe@...hat.com>
Subject: Re: [PATCH] mm: vmalloc: correct use of __GFP_NOWARN mask in
 __vmalloc_area_node()

On Fri, Dec 16, 2022 at 11:46:59PM +0000, Lorenzo Stoakes wrote:
> This function invokes warn_alloc() with __GFP_NOWARN set which is a
> no-op. Set this flag _after_ this call so it is actually invoked, and
> additionally remove a duplicate application of __GFP_NOWARN afterwards.
> 
> Signed-off-by: Lorenzo Stoakes <lstoakes@...il.com>
> ---
>  mm/vmalloc.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/mm/vmalloc.c b/mm/vmalloc.c
> index ca71de7c9d77..9e30f0b39203 100644
> --- a/mm/vmalloc.c
> +++ b/mm/vmalloc.c
> @@ -3031,7 +3031,7 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
>  	int ret;
> 
>  	array_size = (unsigned long)nr_small_pages * sizeof(struct page *);
> -	gfp_mask |= __GFP_NOWARN;
> +
>  	if (!(gfp_mask & (GFP_DMA | GFP_DMA32)))
>  		gfp_mask |= __GFP_HIGHMEM;
> 
> @@ -3051,10 +3051,12 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
>  		return NULL;
>  	}
> 
> +	gfp_mask |= __GFP_NOWARN;
> +
>
There are three more warn_alloc()s below. Those are explicitly disabled.
Could you please rework the patch and make it working also?

--
Uladzislau Rezki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ