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: <20200915181749.2bb7420e2c7e62267b21a0fc@linux-foundation.org>
Date:   Tue, 15 Sep 2020 18:17:49 -0700
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     <yanfei.xu@...driver.com>
Cc:     <linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mm/page_alloc.c: avoid inheritting current's flags when
 invoked in interrupt

On Tue, 15 Sep 2020 15:56:35 +0800 <yanfei.xu@...driver.com> wrote:

> From: Yanfei Xu <yanfei.xu@...driver.com>
> 
> alloc_mask shouldn't inherit the current task's flags when
> __alloc_pages_nodemask is invoked in interrupt.
> 
> ...
>
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -4889,7 +4889,8 @@ __alloc_pages_nodemask(gfp_t gfp_mask, unsigned int order, int preferred_nid,
>  	 * from a particular context which has been marked by
>  	 * memalloc_no{fs,io}_{save,restore}.
>  	 */
> -	alloc_mask = current_gfp_context(gfp_mask);
> +	if (!in_interrupt())
> +		alloc_mask = current_gfp_context(gfp_mask);
>  	ac.spread_dirty_pages = false;
>  
>  	/*

hm, yes, and perhaps other callsites in page_alloc.c.

I assume this doesn't actually make any runtime difference?  Because
gfp_mask in interrupt contexts isn't going to have __GFP_IO or __GFP_FS
anyway.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ