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:	Tue, 24 Jul 2007 22:01:16 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	mel@...net.ie (Mel Gorman)
Cc:	bob.picco@...com, apw@...dowen.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Fix corruption of memmap on IA64 SPARSEMEM when
 mem_section is not a power of 2

On Tue, 13 Mar 2007 10:42:02 +0000 mel@...net.ie (Mel Gorman) wrote:

> There are problems in the use of SPARSEMEM and pageblock flags that causes
> problems on ia64.
> 
> The first part of the problem is that units are incorrect in
> SECTION_BLOCKFLAGS_BITS computation. This results in a map_section's
> section_mem_map being treated as part of a bitmap which isn't good. This
> was evident with an invalid virtual address when mem_init attempted to free
> bootmem pages while relinquishing control from the bootmem allocator.
> 
> The second part of the problem occurs because the pageblock flags bitmap is
> be located with the mem_section. The SECTIONS_PER_ROOT computation using
> sizeof (mem_section) may not be a power of 2 depending on the size of the
> bitmap. This renders masks and other such things not power of 2 base. This
> issue was seen with SPARSEMEM_EXTREME on ia64. This patch moves the bitmap
> outside of mem_section and uses a pointer instead in the mem_section. The
> bitmaps are allocated when the section is being initialised.
> 
> Note that sparse_early_usemap_alloc() does not use alloc_remap() like
> sparse_early_mem_map_alloc(). The allocation required for the bitmap on x86,
> the only architecture that uses alloc_remap is typically smaller than a cache
> line. alloc_remap() pads out allocations to the cache size which would be
> a needless waste.
> 
> Credit to Bob Picco for identifying the original problem and effecting a
> fix for the SECTION_BLOCKFLAGS_BITS calculation. Credit to Andy Whitcroft
> for devising the best way of allocating the bitmaps only when required for
> the section.

SuperH allmodconfig blew up:

mm/sparse.c: In function `sparse_init':
mm/sparse.c:482: error: implicit declaration of function `sparse_early_usemap_alloc'
mm/sparse.c:482: warning: assignment makes pointer from integer without a cast
mm/sparse.c: In function `sparse_add_one_section':
mm/sparse.c:553: error: implicit declaration of function `__kmalloc_section_usemap'
mm/sparse.c:553: warning: assignment makes pointer from integer without a cast
-
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