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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 30 Apr 2008 16:15:40 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	David Miller <davem@...emloft.net>, linux-kernel@...r.kernel.org,
	y-goto@...fujitsu.com
Subject: Re: sparc64 bootup regression...

On Tue, 29 Apr 2008 23:38:32 -0700
Andrew Morton <akpm@...ux-foundation.org> wrote:

> On Tue, 29 Apr 2008 23:12:41 -0700 (PDT) David Miller <davem@...emloft.net> wrote:
> 
> > 
> > This commit causes bootup failures on sparc64:
> > 
> > commit 86f6dae1377523689bd8468fed2f2dd180fc0560
> > Author: Yasunori Goto <y-goto@...fujitsu.com>
> > Date:   Mon Apr 28 02:13:33 2008 -0700
> > 
> >     memory hotplug: allocate usemap on the section with pgdat
> >     
> >     Usemaps are allocated on the section which has pgdat by this.
> >     
> >     Because usemap size is very small, many other sections usemaps are allocated
> >     on only one page.  If a section has usemap, it can't be removed until removing
> >     other sections.  This dependency is not desirable for memory removing.
> >     
> >     Pgdat has similar feature.  When a section has pgdat area, it must be the last
> >     section for removing on the node.  So, if section A has pgdat and section B
> >     has usemap for section A, Both sections can't be removed due to dependency
> >     each other.
> >     
> >     To solve this issue, this patch collects usemap on same section with pgdat.
> >     If other sections doesn't have any dependency, this section will be able to be
> >     removed finally.
> 
> Thanks.  Does a straightforward revert fix it?  If so, we could do that while heads
> are being scratched.

How about this ? If this is messy (or doesn't work), Goto-san will rework
his own patch by himself. (this patch is against -mm but I think no HUNK to
git tree)

==
This kind of page allocation, which specifies the address range,
can fail easily.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiruyo@...fujitsu.com>

Index: mm-2.6.25-mm1/mm/sparse.c
===================================================================
--- mm-2.6.25-mm1.orig/mm/sparse.c
+++ mm-2.6.25-mm1/mm/sparse.c
@@ -264,10 +264,16 @@ static unsigned long *__init sparse_earl
 	 * To solve above issue, this collects all usemap on the same section
 	 * which has pgdat.
 	 */
+#ifdef CONFIG_NUMA /* contig_page_data for !NUMA case is not good to do this */
 	section_nr = pfn_to_section_nr(__pa(pgdat) >> PAGE_SHIFT);
 	usemap = alloc_bootmem_section(usemap_size(), section_nr);
 	if (usemap)
 		return usemap;
+#endif
+	/* above allocation can fail. */
+	usemap = alloc_bootmem_node(NODE_DATA(nid), usemap_size());
+	if (usemap)
+		return usemap;
 
 	/* Stupid: suppress gcc warning for SPARSEMEM && !NUMA */
 	nid = 0;








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