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>] [day] [month] [year] [list]
Date:	Sat, 31 Jan 2009 14:48:40 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Cliffe <cliffe@...net>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: Out of memory error

On Sat, 2009-01-31 at 22:30 +0800, Cliffe wrote:

> > Its simply a case of you using kmalloc(GFP_ATOMIC) and that's failing.
> >   
> 
> So it has nothing to do with stack size because we are talking heap?
> What could be causing the problem?

Right, heap. The thing is, Linux has a greedy memory usage, and tries to
keep as much as possible in memory, this means that we're basically in a
constant state of low memory.

Regular allocations (GFP_KERNEL) can sleep, and can therefore reclaim
memory (write out stuff dirty to disk, swap a little, etc..).

Your allocation (GFP_ATOMIC) isn't allowed to sleep, and can therefore
not reclaim memory -- if it really hits rock bottom, not uncommon, it
just fails to provide memory.

Any code using GFP_ATOMIC (or for that matter, any kernel allocation,
GFP_KERNEL can fail too, just not as easy) must be able to deal with
allocation failures.

How to do that is very domain specific.

> How limited is the stack?

Depends on the arch and build details, 4k is a reasonable assumption.

> > Furthermore, it appears to me you're not using frame pointers for your
> > kernel builds, please ammend that, it gives far more readable output.
> >   
> 
> I'll look into that. Is that a kernel compile config option?

CONFIG_FRAME_POINTER=y

--
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