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, 20 Aug 2007 04:43:50 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	nigel@...pend2.net
Cc:	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Should GFP_ATOMIC fail when we're below low watermark?

On Mon, 2007-08-20 at 11:38 +1000, Nigel Cunningham wrote:
> Hi all.
> 
> In current git (and for a while now), an attempt to allocate memory with 
> GFP_ATOMIC will fail if we're below the low watermark level. The only way to 
> access that memory that I can see (not that I've looked that hard) is to have 
> PF_MEMALLOC set (ie from kswapd). I'm wondering if this behaviour is correct. 
> Shouldn't GFP_ATOMIC allocations ignore watermarks too? How about GFP_KERNEL?
> 
> The following patch is a potential fix for GFP_ATOMIC.

Sorry, no.

GFP_ATOMIC must fail when below the watermark. GFP_KERNEL has __GFP_WAIT
and hence can sleep and wait for reclaim so that should not be a problem
(usually).

GFP_ATOMIC may not access the reserves because the reserves are needed
to get out of OOM deadlocks within the VM. Consider the fact that
freeing memory needs memory - if there is no memory free, you cannot
free memory and you're pretty much stuck.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ