From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mx2.mail.elte.hu ([157.181.151.9]) by bombadil.infradead.org with esmtps (Exim 4.68 #1 (Red Hat Linux)) id 1Kroya-0004FV-RG for kexec@lists.infradead.org; Mon, 20 Oct 2008 07:14:53 +0000 Date: Mon, 20 Oct 2008 09:14:33 +0200 From: Ingo Molnar Subject: Re: [PATCH] kdump: Fix invalid access on i386 sparsemem. Message-ID: <20081020071433.GC12131@elte.hu> References: <48FC0E68.50902@mxs.nes.nec.co.jp> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <48FC0E68.50902@mxs.nes.nec.co.jp> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: kexec-bounces@lists.infradead.org Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: Ken'ichi Ohmichi Cc: "H. Peter Anvin" , kexec-ml , lkml , Huang Ying , Andrew Morton , Yinghai Lu , Thomas Gleixner * Ken'ichi Ohmichi wrote: > > Hi, > > Since linux-2.6.27, kdump has failed on i386 sparsemem kernel. > 1st-kernel gets a panic just before switching to 2nd-kernel. > > The cause is that a kernel accesses invalid mem_section by > page_to_pfn(image->swap_page) at machine_kexec(). > image->swap_page is allocated if kexec for hibernation, but > it is not allocated if kdump. So if kdump, a kernel should > not access the mem_section corresponding to image->swap_page. > The attached patch fixes this invalid access. applied to tip/x86/urgent, thanks! Ingo _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752473AbYJTHPL (ORCPT ); Mon, 20 Oct 2008 03:15:11 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751207AbYJTHO6 (ORCPT ); Mon, 20 Oct 2008 03:14:58 -0400 Received: from mx2.mail.elte.hu ([157.181.151.9]:53698 "EHLO mx2.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750958AbYJTHO6 (ORCPT ); Mon, 20 Oct 2008 03:14:58 -0400 Date: Mon, 20 Oct 2008 09:14:33 +0200 From: Ingo Molnar To: "Ken'ichi Ohmichi" Cc: kexec-ml , lkml , Andrew Morton , Huang Ying , Yinghai Lu , Thomas Gleixner , "H. Peter Anvin" Subject: Re: [PATCH] kdump: Fix invalid access on i386 sparsemem. Message-ID: <20081020071433.GC12131@elte.hu> References: <48FC0E68.50902@mxs.nes.nec.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48FC0E68.50902@mxs.nes.nec.co.jp> User-Agent: Mutt/1.5.18 (2008-05-17) X-ELTE-VirusStatus: clean X-ELTE-SpamScore: -1.5 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=-1.5 required=5.9 tests=BAYES_00,DNS_FROM_SECURITYSAGE autolearn=no SpamAssassin version=3.2.3 -1.5 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0020] 0.0 DNS_FROM_SECURITYSAGE RBL: Envelope sender in blackholes.securitysage.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Ken'ichi Ohmichi wrote: > > Hi, > > Since linux-2.6.27, kdump has failed on i386 sparsemem kernel. > 1st-kernel gets a panic just before switching to 2nd-kernel. > > The cause is that a kernel accesses invalid mem_section by > page_to_pfn(image->swap_page) at machine_kexec(). > image->swap_page is allocated if kexec for hibernation, but > it is not allocated if kdump. So if kdump, a kernel should > not access the mem_section corresponding to image->swap_page. > The attached patch fixes this invalid access. applied to tip/x86/urgent, thanks! Ingo