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] [day] [month] [year] [list]
Message-ID: <46697EB4.5060003@shadowen.org>
Date:	Fri, 08 Jun 2007 17:07:16 +0100
From:	Andy Whitcroft <apw@...dowen.org>
To:	Bob Picco <bob.picco@...com>
CC:	john stultz <johnstul@...ibm.com>,
	Chuck Ebbert <cebbert@...hat.com>,
	lkml <linux-kernel@...r.kernel.org>,
	Sripathi Kodi <sripathik@...ibm.com>,
	Bernhard Walle <bwalle@...e.de>, acme@...hat.com,
	tglx@...utronix.de, akpm@...ux-foundation.org, andi@...stfloor.org
Subject: Re: [BUG] sysrq-m oops

Bob Picco wrote:
> john stultz wrote:	[Thu Jun 07 2007, 03:54:41PM EDT]
> [snip]
> john you are welcome.
> 
> We aren't sampling for holes in memory. Thus we encounter a section hole with
> empty section map pointer for SPARSEMEM and OOPs for show_mem. This issue
> has been seen in 2.6.21, current git and current mm. The patch below
> is for mainline and mm. It was boot tested for SPARSEMEM, current
> VMEMMAP of Andy's in mm ml and DISCONTIGMEM. A slightly different patch
> will be posted to stable for 2.6.21.
> 
> Previous to commit f0a5a58aa812b31fd9f197c4ba48245942364eae memory_present
> was called for node_start_pfn to node_end_pfn. This would cover the hole(s)
> with reserved pages and valid sections. Most SPARSEMEM supported arches
> do a pfn_valid check in show_mem before computing the page structure address.
> 
> This issue was brought to my attention on IRC by Arnaldo Carvalho de Melo at
> acme@...hat.com. Thanks to Arnaldo for testing.
> 
> Signed-off-by: Bob Picco <bob.picco@...com>
> 
>  arch/x86_64/mm/init.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> Index: linux-2.6.22-rc4-mm1/arch/x86_64/mm/init.c
> ===================================================================
> --- linux-2.6.22-rc4-mm1.orig/arch/x86_64/mm/init.c	2007-06-06 12:59:26.000000000 -0400
> +++ linux-2.6.22-rc4-mm1/arch/x86_64/mm/init.c	2007-06-07 11:14:31.000000000 -0400
> @@ -79,6 +79,8 @@ void show_mem(void)
>  			if (unlikely(i % MAX_ORDER_NR_PAGES == 0)) {
>  				touch_nmi_watchdog();
>  			}
> +			if (!pfn_valid(pgdat->node_start_pfn + i))
> +				continue;
>  			page = pfn_to_page(pgdat->node_start_pfn + i);
>  			total++;
>  			if (PageReserved(page))

Yes this is required with SPARSEMEM.  Good spot.

Acked-by: Andy Whitcroft <apw@...dowen.org>

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