Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2158743yba; Wed, 3 Apr 2019 02:30:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqynutZ8duuzSU/KZmmaH0+iKaKpzjsISbW8KDehydi20e8DUGmETNW0VZhh/KDBXwEpv+IY X-Received: by 2002:a63:700f:: with SMTP id l15mr26538531pgc.3.1554283844664; Wed, 03 Apr 2019 02:30:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554283844; cv=none; d=google.com; s=arc-20160816; b=W1qRz+IUiewzN2XA0v+dvz5mZa2cEUxKwnqFPjpjBXEueu2krVIaEdQQM8NBN0O2xE Cr//e4RaAA8zT6tx4tgskdcwXEsE3fgSCCbJ21XmHhZTbj0Jy+wnD6lIoOM0KsIpUZwm UcS2A9IzI51NYN286ekKoc2nnDapXjhfMFQZHmWGOYuZmblFYha7LjHsY7XSX+ADreNO Z7cTPba5SNPiRbho79ipRz08gJXye+BRf65YPdcKRPGEDfMKD5Pz3YsH6K/PfRJ2IWK6 /XQ+egGg4b4DOktrV6DsLbDea+z1YJ0l1YyNg+1AKlM2TEnK+C628tZhXT/G2ImVEQBI Qgew== 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=R4f0m7/5+jHVKdvlj+tKpmnLA+8u+kzWP+mylhx6KGk=; b=acjrEQTCz9wL37xil2FuropPSz47uj3XHFiR8StX3+q4b1dmO0QyIj+GeQ/zhcgWd3 Zy41UgFLrF7UtepL+BQ5TrbsS5hF8lJcoYqgiodJBsQx+fkTJDrUPXroO8+Zi6yur8ZJ gR+h3b2oWCwo7oQvjT0nQrAhB+Vsk7zmeQw+GoX6jARUWmE/4akXNUCair/6GFO88EEQ 7VHCrxoDnJHiWNMH2r7waCjo2yae8/pgmjbOIE2YLJBxzEj6RqSiNcV0+FR+NOfj2rMK KsjbiGWd1cuxkQAqkDMsYKgnKB8+gg4TJQOKCxPDuBcgc1H7eIsPPlzzl9/dorxSc0oB mtJA== 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 37si13719313pgz.512.2019.04.03.02.30.28; Wed, 03 Apr 2019 02:30:44 -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 S1726499AbfDCJ23 (ORCPT + 99 others); Wed, 3 Apr 2019 05:28:29 -0400 Received: from mail.cn.fujitsu.com ([183.91.158.132]:2581 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726084AbfDCJ22 (ORCPT ); Wed, 3 Apr 2019 05:28:28 -0400 X-IronPort-AV: E=Sophos;i="5.60,304,1549900800"; d="scan'208";a="58379024" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 03 Apr 2019 17:28:27 +0800 Received: from G08CNEXCHPEKD01.g08.fujitsu.local (unknown [10.167.33.80]) by cn.fujitsu.com (Postfix) with ESMTP id 7AB984CD7EE6; Wed, 3 Apr 2019 17:28:26 +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 17:28:30 +0800 Date: Wed, 3 Apr 2019 17:28:21 +0800 From: Chao Fan To: "bhe@redhat.com" CC: Dave Young , Junichi Nomura , Borislav Petkov , "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: <20190403092821.GI1555@localhost.localdomain> References: <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> <20190403073023.GF1555@localhost.localdomain> <20190403075015.GQ7627@MiWiFi-R3L-srv> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20190403075015.GQ7627@MiWiFi-R3L-srv> User-Agent: Mutt/1.11.3 (2019-02-01) X-Originating-IP: [10.167.225.56] X-yoursite-MailScanner-ID: 7AB984CD7EE6.AD589 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 03:50:15PM +0800, bhe@redhat.com wrote: >On 04/03/19 at 03:30pm, Chao Fan wrote: >> 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(). > >Yes, seems get_rsdp_addr() has issue in this case. I am wondering if we >can adjust the postion of get_rsdp_addr() calling. If nokaslr is >specified, no need to get rsdp? I think no, RSDP parsing dosn't only work for KASLR. Thanks, Chao Fan > >> >> 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); >> > >> > >> > >> >> > >