Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp3025123img; Mon, 25 Mar 2019 02:06:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqw5syVxgviNNQvN4zV/AYVb7KIdUD9KdEWHjm6vJT+H8HufzvFgS9x8teeSdkZrsvob3JoP X-Received: by 2002:a17:902:4301:: with SMTP id i1mr24371552pld.307.1553504764800; Mon, 25 Mar 2019 02:06:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553504764; cv=none; d=google.com; s=arc-20160816; b=t1X2bHmVV/WTIFopFs8Kk0P2zDkhQl3BRm8U3ijz9a1cVmjGwWLJCPvyZn1xDl67ZH 719dwDvyKHoXU2JiBJwJYEuQTWWH4uv47/rOzKUXetk2qIhQwpSdNm2urcpOvvRRkvwz GQWHz9TYau+z9Yj8clzrh5LaBsLxpaCA/A1sr2Xn/l1cs3156nYEm5g6W69BLagRHBgG mg1p8WBoTc8NVyl98LVdguvh4H+zoY3aVA4DKcKvlSR10V257vB4BRRsvQNzd1XbrM87 Zmg7VM8P9rMqP2+KjDnnC9kQ+o3mXPrDAeTtnovp9gvQnClxrX4Fx6KJm0FF9kQJ4zSu T/Kg== 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=eCqtd0rgIHnhPIbVR8Q8U/x9B+YbZAkN5vcUwTMft80=; b=zB/pF0OyiWhyfvvN3KaWP66TcAcScDjQsbWe7NaCcQkfN76p/8vcweLu12mYyMqR1i Q3jvPcYG1Ta7Wth+6RKqtCpPTN1623Wx9v/xY50QYQC2KpwzY2VKAgTtynJxqeuSJ+8O /b5iLSTNRmV/OzU9cd66BbncK472If9fPrSjcrf8NF+ouZYvPMQIxgwH8XiRbByp7zgt uTmbVFVd+nTcfSYgMIraDms9wsP/HKpkrNdBRc0UrbHfbBblTTdBU2c8Y7NJDXo+dAjA UYbY1/zucjnoLsVncCHsgAYX/aNePmC9zvb9Q49/e2bcH/mH3PshF6w+i0lH3fyXeRpS A4Kw== 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 c10si3016915pfg.172.2019.03.25.02.05.49; Mon, 25 Mar 2019 02:06:04 -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 S1730128AbfCYJDx (ORCPT + 99 others); Mon, 25 Mar 2019 05:03:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42590 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726234AbfCYJDx (ORCPT ); Mon, 25 Mar 2019 05:03:53 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4DBC699C4B; Mon, 25 Mar 2019 09:03:53 +0000 (UTC) Received: from localhost (ovpn-12-56.pek2.redhat.com [10.72.12.56]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AB3E8611B7; Mon, 25 Mar 2019 09:03:52 +0000 (UTC) Date: Mon, 25 Mar 2019 17:03:49 +0800 From: Baoquan He To: Thomas Gleixner Cc: Borislav Petkov , Junichi Nomura , "fanc.fnst@cn.fujitsu.com" , "linux-kernel@vger.kernel.org" , "x86@kernel.org" Subject: Re: [PATCH] x86/boot: Use EFI setup data if provided Message-ID: <20190325090349.GE3659@MiWiFi-R3L-srv> References: <20190322110342.GA16202@jeru.linux.bs1.fc.nec.co.jp> <20190322152328.GD12472@zn.tnic> <20190325072710.GA31828@MiWiFi-R3L-srv> <20190325075342.GE12016@zn.tnic> <20190325082124.GD3659@MiWiFi-R3L-srv> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 25 Mar 2019 09:03:53 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/25/19 at 09:43am, Thomas Gleixner wrote: > On Mon, 25 Mar 2019, Baoquan He wrote: > > > On 03/25/19 at 08:53am, Borislav Petkov wrote: > > > On Mon, Mar 25, 2019 at 03:27:10PM +0800, Baoquan He wrote: > > > > 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. > > > > > > Yes, kexec is a pile of ugly and fragile hackery. > > > > Well, yes, we have to admit that, since kexec is based on hacking. > > Well, then the right thing to do is to think about it proper and replace > the hackery by something well thought out instead of adding duct tape to it > every other day. I could make mistakes on expressing. I meant the mechanism of kexec is based on hacking into kernel booting stuff. So sometime we call kexec a bootloader, at least a bootloader variant. That means we may need to adapt code when any change is made in kernel boot side. E.g for this acpi_rsdp_addr adding, it happened in boot compressing stage, to get rsdp to fix the conflict between KASLR and HOTPLUG. Accordingly, kexec code need be adpated too. So, when maintain kexec/kdump, we have to track and test any change which could happen in kernel boot. Thanks Baoquan