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
| ||
|
Date: Tue, 18 Dec 2007 13:31:52 +0100 From: tsbogend@...ha.franken.de (Thomas Bogendoerfer) To: Andrew Morton <akpm@...ux-foundation.org> Cc: linux-kernel@...r.kernel.org, Mel Gorman <mel@....ul.ie>, Bob Picco <bob.picco@...com>, Dave Hansen <haveblue@...ibm.com>, Andy Whitcroft <apw@...dowen.org>, Andi Kleen <ak@....de>, Benjamin Herrenschmidt <benh@...nel.crashing.org>, Paul Mackerras <paulus@...ba.org>, Keith Mannthey <kmannth@...il.com>, "Luck, Tony" <tony.luck@...el.com>, KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>, Yasunori Goto <y-goto@...fujitsu.com>, Linus Torvalds <torvalds@...ux-foundation.org> Subject: Re: [PATCH] Fix crash with FLAT_MEMORY and ARCH_PFN_OFFSET != 0 On Tue, Dec 18, 2007 at 04:24:04AM -0800, Andrew Morton wrote: > On Tue, 18 Dec 2007 13:03:00 +0100 (CET) Thomas Bogendoerfer <tsbogend@...ha.franken.de> wrote: > > --- a/mm/page_alloc.c > > +++ b/mm/page_alloc.c > > @@ -3427,7 +3427,7 @@ static void __init_refok alloc_node_mem_map(struct pglist_data *pgdat) > > mem_map = NODE_DATA(0)->node_mem_map; > > #ifdef CONFIG_ARCH_POPULATES_NODE_MAP > > if (page_to_pfn(mem_map) != pgdat->node_start_pfn) > > - mem_map -= pgdat->node_start_pfn; > > + mem_map -= (pgdat->node_start_pfn - ARCH_PFN_OFFSET); > > #endif /* CONFIG_ARCH_POPULATES_NODE_MAP */ > > } > > #endif > > hm. It's rather non-trivial to verify that this will compile OK on all > architectures. I grepped through include/asm-* and found: #if defined(CONFIG_FLATMEM) #ifndef ARCH_PFN_OFFSET #define ARCH_PFN_OFFSET (0UL) #endif in include/asm-generic/memory_model.h. So I'm still confident, that this works on all architectures. It's tested on MIPS. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessary a good idea. [ RFC1925, 2.3 ] -- 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