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: <20080416010252.GA27499@elte.hu>
Date:	Wed, 16 Apr 2008 03:02:52 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Yinghai Lu <yhlu.kernel@...il.com>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Pekka Enberg <penberg@...helsinki.fi>,
	Christoph Lameter <clameter@....com>,
	linux-kernel@...r.kernel.org, Mel Gorman <mel@....ul.ie>,
	Nick Piggin <npiggin@...e.de>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"Rafael J. Wysocki" <rjw@...k.pl>, apw@...dowen.org,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Subject: Re: [patch] mm: sparsemem memory_present() memory corruption fix


* Yinghai Lu <yhlu.kernel@...il.com> wrote:

> On Tue, Apr 15, 2008 at 5:44 PM, Ingo Molnar <mingo@...e.hu> wrote:
> >
> >  * Yinghai Lu <yhlu.kernel@...il.com> wrote:
> >
> >  > >  +       unsigned long max_arch_pfn = 1ULL << (MAX_PHYSMEM_BITS-PAGE_SHIFT);
> >  > >
> >  > >  and also check my analysis whether it is correct and whether it
> >  > >  matches the reported bug patterns. But otherwise the fix looks like
> >  > >  a safe fix for v2.6.25-final to me - it only filters out values
> >  > >  from sparsemem input that are nonsensical in the sparsemem
> >  > >  framework anyway.
> >  >
> >
> > > can you check why find_max_pfn() e820_32.c need to call
> >  > memory_present? wonder if it can be removed.
> >
> >  this is the only call to memory_present() we do in 32-bit arch setup, so
> >  it's required.
> >
> >  (the function find_max_pfn() is woefully misnamed, but that's a cleanup
> >  - i just fixed this in x86.git.)
> 
> 64 bit is calling that via paging_init
> ==>sparse_memory_present_with_active_regions(MAX_NUMNODES).
> 
> and
> void __init sparse_memory_present_with_active_regions(int nid)

yeah - 64-bit is different here and it's not affected by the problem 
because there SECTION_SIZE_BITS is 27 (==128 MB chunks), 
MAX_PHYSADDR_BITS is 40 (== 1 TB) - giving 8192 section map entries. 
Once larger than 1 TB 64-bit x86 systems are created MAX_PHYSADDR_BITS 
needs to be increased.

The only downside of the current setup on 64-bit is that it wastes 128K 
of RAM on the majority of systems. We could perhaps try a shift of 28, 
which halves the footprint to 64K of RAM, and which still is good enough 
to allow the PCI aperture to remain a hole on most systems. It would 
also compress the data-cache footprint of the sparse memory maps. 
(without having to use sparsemem-extreme indirection)

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