Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp2963510img; Mon, 25 Mar 2019 00:28:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqyqJhRhiXTc/dvwG2OezzOlYgwmNx4zXpPMt1MHWhtJ3iHYTv6nW9Ou6I+d1j7t4n8xX/7H X-Received: by 2002:a63:fa01:: with SMTP id y1mr21664633pgh.5.1553498883587; Mon, 25 Mar 2019 00:28:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553498883; cv=none; d=google.com; s=arc-20160816; b=Y3aEhiRvv51abi9Oo0qvOb9cymM/00yhWnGaGAbBQwWq93VOyxZ5XwxIGkLI9f/qU/ SnwOmsZJeBOAaZCaCydCxKaO3h68sAFyGxTegJGswiDJL796SGBB3G+skBrOHz4wIzJc WR7T6uRAcnYwm0PY4MdlvY+IARqmThDuxWpErkmuBCZk40vXw3/eBj1eH1+4uepBnBPd tq+02KLNDTXxoGdADG6Sorr7GOf2qwt7q9K/fRCMI3Njk0PuTBAifuzFp+GUdxBHoCyw 4+FgFiJ99N487qaSyrD/spiiwCVNd7Z1Rb96R3Ao8BGNhVf//Jp5xGCkctEKp8B7F0kY xKGw== 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=27VLk335rKK9Cx+50DSui48W9qLuMSG+JRjX0TXvzZw=; b=DGwXtQ8fwovPzYQBpu7CDEguLnjpE2Q5ZRjyaqRS9I4P483h7S4kiq0aQNOwzvHzVU jJ3T7Gf+jzJA8BuTb6XCclFvjn2NL/rp11UxSVgGgLBIZ8Tz1LluBLVGNgThun6qnwT4 6965wrYJ2n++ohFg+By0/mFI9/G9Tq9Fj631EEDba7XLFkBrzKdSx5pfuodSQhTRoShk N65uCF3JV5NoxPzsnIRoiBXbMwYgMRHWpliIe+ApXGBq3uGsuYG/2flPXOlC0BafDJW6 x71wdcfpksoetL0FenKit4/azxk6fEwR+bLVPzTvLx1UuHZg0nBYcMNPLCX9RwXEPtS0 rrfg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k9si4258236pgc.156.2019.03.25.00.27.48; Mon, 25 Mar 2019 00:28:03 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729810AbfCYH1O (ORCPT + 99 others); Mon, 25 Mar 2019 03:27:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40440 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729764AbfCYH1O (ORCPT ); Mon, 25 Mar 2019 03:27:14 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B18463082E90; Mon, 25 Mar 2019 07:27:13 +0000 (UTC) Received: from localhost (ovpn-12-56.pek2.redhat.com [10.72.12.56]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 18E321001E70; Mon, 25 Mar 2019 07:27:12 +0000 (UTC) Date: Mon, 25 Mar 2019 15:27:10 +0800 From: Baoquan He To: Borislav Petkov Cc: Junichi Nomura , "fanc.fnst@cn.fujitsu.com" , "bp@suse.de" , "linux-kernel@vger.kernel.org" , "x86@kernel.org" Subject: Re: [PATCH] x86/boot: Use EFI setup data if provided Message-ID: <20190325072710.GA31828@MiWiFi-R3L-srv> References: <20190322110342.GA16202@jeru.linux.bs1.fc.nec.co.jp> <20190322152328.GD12472@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190322152328.GD12472@zn.tnic> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Mon, 25 Mar 2019 07:27:13 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/22/19 at 04:23pm, Borislav Petkov wrote: > On Fri, Mar 22, 2019 at 11:03:43AM +0000, Junichi Nomura wrote: > > Commit 3a63f70bf4c3a ("x86/boot: Early parse RSDP and save it in > > boot_params") broke kexec boot on EFI systems. efi_get_rsdp_addr() > > in the early parsing code tries to search RSDP from EFI table but > > whose address is virtual. > > > > Since kexec(1) provides physical address of config_table via boot_params, > > efi_get_rsdp_addr() should look for setup_data in the same way as > > efi_systab_init() in arch/x86/platform/efi/efi.c does. > > If the kexec kernel should continue to use efi_systab_init() then you > should make efi_get_rsdp_addr() exit early in the kexec-ed kernel. Kexec kernel also need to get rsdp to get SRAT tables so that KASLR can avoid those hotpluggable regions in boot compression stage. The kexec_file_load has filled in acpi_rsdp_addr of kexec kernel in below code. It will return direclty in get_rsdp_addr() since acpi_rsdp_addr is got from boot_params->acpi_rsdp_addr. arch/x86/kernel/kexec-bzimage64.c <> params->acpi_rsdp_addr = boot_params.acpi_rsdp_addr; The other interface, kexec_load, its boot_params filling is done in user space kexec_tools. And we haven't made the acpi_rsdp_addr filling yet. And the old kexec_tools utility can also cause the new kexec kernel to search efi rspd pointer even thought it's fixed. Thanks Baoquan > > -- > Regards/Gruss, > Boris. > > Good mailing practices for 400: avoid top-posting and trim the reply.