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: <alpine.DEB.2.00.1008040951170.11084@router.home>
Date:	Wed, 4 Aug 2010 10:40:27 -0500 (CDT)
From:	Christoph Lameter <cl@...ux-foundation.org>
To:	Peter Crosthwaite <peter.crosthwaite@...alogix.com>
cc:	linux-kernel@...r.kernel.org, penberg@...helsinki.fi,
	mpm@...enic.com, Michal Simek <michal.simek@...alogix.com>,
	"Edgar E. Iglesias" <edgar.iglesias@...alogix.com>,
	John Williams <john.williams@...alogix.com>
Subject: Re: Using Bootmem for large DMA buffers in the presence of the slab
  allocator

On Wed, 4 Aug 2010, Peter Crosthwaite wrote:

> Because the buffer was too large for kmalloc, the kmalloc call would
> fail. I traced the alloc_bootmem_low_pages() call further and
> discovered that since the kmalloc call was failing, it was falling
> back to alloc_bootmem_core(). So does this mean that the bootmem
> allocator is trying to allocate memory while the slab allocator is up
> and running? And is this supposed to work?

The bootmem allocator should not work when slab is fully up. However,
there is a grey period where the page allocator is not fully functional
yet but the slab allocator is mostly working.

> The reason i ask, is that when testing the system under high memory
> usage conditions, I would get a "Bad page state" BUG() for my
> allocated pages (see below). I have matched the pfns and confirmed
> that they correspond to the pages allocated by the
> alloc_bootmem_low_pages(). My theory is that the slab allocators list
> of free pages does not get updated by the bootmem allocator, so the
> slab allocator is seeing my DMA buffer as un-allocated. Does this
> sound correct?

bootmem allocations do not reserve page structs. So you do not have a page
state at all. If you do something that requires a page state then you will
have strange failures.
--
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