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:	Tue, 5 May 2009 09:49:28 +0100
From:	Mel Gorman <mel@....ul.ie>
To:	Russell King - ARM Linux <linux@....linux.org.uk>
Cc:	akpm@...ux-foundation.org, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, hartleys@...ionengravers.com,
	mcrapet@...il.com, fred99@...olina.rr.com,
	linux-arm-kernel@...ts.arm.linux.org.uk
Subject: Re: [PATCH] Double check memmap is actually valid with a memmap
	has unexpected holes

On Tue, May 05, 2009 at 09:36:14AM +0100, Russell King - ARM Linux wrote:
> On Tue, May 05, 2009 at 09:29:44AM +0100, Mel Gorman wrote:
> > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> > index e02b893..6d79051 100644
> > --- a/arch/arm/Kconfig
> > +++ b/arch/arm/Kconfig
> > @@ -925,10 +925,9 @@ config OABI_COMPAT
> >  	  UNPREDICTABLE (in fact it can be predicted that it won't work
> >  	  at all). If in doubt say Y.
> >  
> > -config ARCH_FLATMEM_HAS_HOLES
> > +config ARCH_HAS_HOLES_MEMORYMODEL
> 
> Can we arrange for EP93xx to select this so we don't have it enabled for
> everyone.
> 
> The other user of this was RPC when it was flatmem only, but since it has
> been converted to sparsemem it's no longer an issue there.
> 

This problem is hitting SPARSEMEM, at least according to reports I have
been cc'd on so it's not a SPARSEMEM vs FLATMEM thing. From the leader --
"This was caught before for FLATMEM and hacked around but it hits again for
SPARSEMEM because the page_zone linkages can look ok where the PFN linkages
are totally screwed."

If you feel that this problem is only encountered on the EP93xx, then the
option could be made more conservative with the following (untested) patch
and then wait to see who complains.

==== CUT HERE ====

arm: Only select ARCH_HAS_HOLES_MEMORYMODEL on the EP93xx

ARM frees unused memmap to save memory but this can collide with the core
VM's view of the memory model when walking what it views to be valid PFNs in
the system. ARM selects ARCH_HAS_HOLES_MEMORYMODEL for all architectures to
double check the memmap being examined is valid but it has been asserted
that this may only be needed on EP93xx in practice. This patch selects
ARCH_HAS_HOLES_MEMORYMODEL only for that sub-architecture.

Signed-off-by: Mel Gorman <mel@....ul.ie>
--- 
 arch/arm/Kconfig |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 6d79051..a4c195c 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -273,6 +273,7 @@ config ARCH_EP93XX
 	select HAVE_CLK
 	select COMMON_CLKDEV
 	select ARCH_REQUIRE_GPIOLIB
+	select ARCH_HAS_HOLES_MEMORYMODEL
 	help
 	  This enables support for the Cirrus EP93xx series of CPUs.
 
@@ -927,7 +928,7 @@ config OABI_COMPAT
 
 config ARCH_HAS_HOLES_MEMORYMODEL
 	bool
-	default y
+	default n
 
 # Discontigmem is deprecated
 config ARCH_DISCONTIGMEM_ENABLE
--
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