Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2082844yba; Wed, 3 Apr 2019 00:31:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqxIVvb6SVD3XzS6by1A6L3mGnpGEw8T1Ipae8phJOM9Lx1YVZo9ucad2wzQEgdn9NxBqiON X-Received: by 2002:a17:902:b617:: with SMTP id b23mr13554963pls.73.1554276698611; Wed, 03 Apr 2019 00:31:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554276698; cv=none; d=google.com; s=arc-20160816; b=PsAydpecMPzOGllQaUYTDsh18DvY0qRdt9v725Rlj9MPyX3ZqrTbefudEQFuq6iDc7 jIMC63yYOLiOTYIC2Xbfn1VKA9bVk1T5juW+ZlFFobjj4PSxgMXWbtkTfCL9lDSbivLM fwuK/lYpi8HANPcVZCrTrWnpQM73Lx9raWIV1U2rgHW4TsNqHeqj/ytpkjC5Fpwvzt20 /tsXPhG//za8IHE4YJNFs+bh5kdvSyjc/8AUtLcSw+BcviLoWMBk6aZv7BGq1/cK/0DT Z8AiYh4UrtkQv5zUUVEqnukywhjzT2H1WTVxglxqQNsTxTeLN2l06LR/iq7LDGxOW0qS bfVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=xeCffCm3oPsAj9dhy+buJ9LQ7KWNCUR7HaZF5sd+PKo=; b=Jj5wWc8l9TMaz0X746DQte6oGHziB1sFstxrVnk3jleG2K34izrsi4pfvEtnvVPmCC qXIHOCu5t/ykYEFNo3kp8t0MUqIYUMBzp42eRqw98nufRsLgWRDv5OmSd/Mb2bR/B1e1 lGS4AbrzN+/cCuNjNNLjNPqOQXSxomjT/U4FK4oMFE8K1tEhCC7X4FLlLu/QzZoZtzU+ ECbL+3uXCMnQn/ATKW5VD+f1KwPM6nKdcjAnhRj70oS2owJEwD6OmtQmU7hQfONm+M/T 4QesSYcnUnPnMPtpC699g8DRHbBIuPh5JElrUlLDpycOMofRRsp/T8nc6bCWUXnyatjw Vb9Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g1si12698882plt.318.2019.04.03.00.31.23; Wed, 03 Apr 2019 00:31:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728683AbfDCHac (ORCPT + 99 others); Wed, 3 Apr 2019 03:30:32 -0400 Received: from mail.cn.fujitsu.com ([183.91.158.132]:18868 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725936AbfDCHac (ORCPT ); Wed, 3 Apr 2019 03:30:32 -0400 X-IronPort-AV: E=Sophos;i="5.60,303,1549900800"; d="scan'208";a="58369011" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 03 Apr 2019 15:30:29 +0800 Received: from G08CNEXCHPEKD01.g08.fujitsu.local (unknown [10.167.33.80]) by cn.fujitsu.com (Postfix) with ESMTP id 3E5CE4C8B03D; Wed, 3 Apr 2019 15:30:28 +0800 (CST) Received: from localhost.localdomain (10.167.225.56) by G08CNEXCHPEKD01.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 3 Apr 2019 15:30:31 +0800 Date: Wed, 3 Apr 2019 15:30:23 +0800 From: Chao Fan To: Dave Young CC: Junichi Nomura , Borislav Petkov , "bhe@redhat.com" , "kasong@redhat.com" , "x86@kernel.org" , "kexec@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v2] x86/boot: Use efi_setup_data for searching RSDP on kexec-ed kernel Message-ID: <20190403073023.GF1555@localhost.localdomain> References: <20190327014852.GA3659@MiWiFi-R3L-srv> <73322ba9-e436-68db-7863-afd31607d969@ce.jp.nec.com> <20190328064343.GA1877@MiWiFi-R3L-srv> <20190328074337.GA9470@jeru.linux.bs1.fc.nec.co.jp> <20190328155256.GP22720@zn.tnic> <20190401000837.GA5170@jeru.linux.bs1.fc.nec.co.jp> <20190402120319.GA7605@dhcp-128-65.nay.redhat.com> <20190403053459.GD1555@localhost.localdomain> <20190403055340.GA11976@dhcp-128-65.nay.redhat.com> <20190403063911.GA2579@dhcp-128-65.nay.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20190403063911.GA2579@dhcp-128-65.nay.redhat.com> User-Agent: Mutt/1.11.3 (2019-02-01) X-Originating-IP: [10.167.225.56] X-yoursite-MailScanner-ID: 3E5CE4C8B03D.ADED7 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: fanc.fnst@cn.fujitsu.com X-Spam-Status: No Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 03, 2019 at 02:39:11PM +0800, Dave Young wrote: >> Actually I got some different kexec test results. >> >> Yesterday, with my installed kernel (based on git head several weeks >> ago), kexec kernel panics. >> >> Then I tried latest mainline with git pull, everything works, (with or >> without the patch, and can not reproduce the bug this patch is fixing) >> >> Today, test again, kexec reboot hangs (with or without your patch), but >> kdump works always (with or without the patch) >> >> It is weird to me. Probably I need find out why I can not reproduce the >> bug this patch is addressing first. >> >> earlyprintk seems not working for me anymore, it is not easy to debug on >> laptop now. >> >> But the patch itself is clear, I think it should be good. There might be >> other things broken. > >Disable your immovable mem code then everything works for me. There >might be something wrong in the code. Also "nokaslr" does not help, it >should be another problem If "nokaslr" doesn't help, so I think >+ /*num_immovable_mem = count_immovable_mem_regions();*/ also doesn't help. I think the problem is from get_rsdp_addr(). You test it in your laptop, I only tested in Qemu guest. I have no laptop avaliable, so I will look for a physical machine to test it. Thanks, Chao Fan > >diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot/compressed/kaslr.c >index 2e53c056ba20..e760c9159662 100644 >--- a/arch/x86/boot/compressed/kaslr.c >+++ b/arch/x86/boot/compressed/kaslr.c >@@ -416,7 +416,7 @@ static void mem_avoid_init(unsigned long input, unsigned long input_size, > handle_mem_options(); > > /* Enumerate the immovable memory regions */ >- num_immovable_mem = count_immovable_mem_regions(); >+ /*num_immovable_mem = count_immovable_mem_regions();*/ > > #ifdef CONFIG_X86_VERBOSE_BOOTUP > /* Make sure video RAM can be used. */ >diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c >index c0d6c560df69..1bc6f46d3aa7 100644 >--- a/arch/x86/boot/compressed/misc.c >+++ b/arch/x86/boot/compressed/misc.c >@@ -352,7 +352,7 @@ asmlinkage __visible void *extract_kernel(void *rmode, memptr heap, > boot_params->hdr.loadflags &= ~KASLR_FLAG; > > /* Save RSDP address for later use. */ >- boot_params->acpi_rsdp_addr = get_rsdp_addr(); >+/* boot_params->acpi_rsdp_addr = get_rsdp_addr(); */ > > sanitize_boot_params(boot_params); > > >