Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp9572148imu; Wed, 5 Dec 2018 07:00:59 -0800 (PST) X-Google-Smtp-Source: AFSGD/VXlpPqfM9PRZ1eMCrxrhH7MMobrjmvfJlTwfA791rAnZcFFx2+U9bEENMq8gQLCMaNV7ZT X-Received: by 2002:a63:a611:: with SMTP id t17mr20494892pge.338.1544022058947; Wed, 05 Dec 2018 07:00:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544022058; cv=none; d=google.com; s=arc-20160816; b=LiE1D1i8dO/n8rvuyL1k9LJQyQuCoZXKWZtF5F++8hr/xdA44Verp3b8x9BYlgdTn8 EcmljB8MCLyPduSGQhq7+k8CGlIoe7TLHrpd4qAJew4W2z10+0CNkjikSGc9v3esOs4+ X7sG2/Cg15wdEW4U5cXLlFqKJM2FyJtpWjVMrkJpl+BWZ188U8a2Ni9sTtiXJ6mx56tB AkZCLJlN8hsevMYUF+5hZBEU8ym5Vqu+Vo4qKBIb0Ar8qmH9g99vDt+hqzzH50RfJXsq MBvhnjI196fLswrbOntj7VRL5pozpVwAaLovQ7BDZV3Vzux6B3x7SvcOJnpCZ7katFTp F9qQ== 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:dkim-signature; bh=yKJK8SNzH08YnQbWv5nO2JLTb6E7gcqSfzMvBrFvI8M=; b=0goLU4B4C+jXPm6yBdUTdeMU6i0Vb6XdgAx7yl3bcmn5QH5oyWJfF2Dj2xXJlIg7Z6 HBO5CKVlYCqoSrVeFB29WN/jcU/PA1BS1CHu5zWgKGv7MJz1hKHF21jsnCfMaXxM0pXA l4GpXAHOEL7Zxjg8x2eUxnGcluUbGmT6zEhtfQRxvU9pLmZ74Iw9yhaTrDmmxZwlWwJx BYwzffcVE5L0+jGqGil9eLulm+26ZgnQt13e/QhEqKy1QYSVirGK3zWYpnNoHIEnDw0W eBcHEFqaxwjBlWBvvgWaZ1HE0lg/yp5BFQ3qMnclOY6TzP4at15XgyHZwdqLa7ePQv6g IW+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=BYxEYC9N; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v6si17994300pgv.277.2018.12.05.07.00.39; Wed, 05 Dec 2018 07:00:58 -0800 (PST) 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; dkim=pass header.i=@alien8.de header.s=dkim header.b=BYxEYC9N; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727872AbeLEO6Y (ORCPT + 99 others); Wed, 5 Dec 2018 09:58:24 -0500 Received: from mail.skyhub.de ([5.9.137.197]:48290 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727103AbeLEO6Y (ORCPT ); Wed, 5 Dec 2018 09:58:24 -0500 Received: from zn.tnic (p200300EC2BC09900E0912853F26C5B9C.dip0.t-ipconnect.de [IPv6:2003:ec:2bc0:9900:e091:2853:f26c:5b9c]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 396CC1EC027B; Wed, 5 Dec 2018 15:58:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1544021902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=yKJK8SNzH08YnQbWv5nO2JLTb6E7gcqSfzMvBrFvI8M=; b=BYxEYC9NABNRdIepiYNFKkuBdeqDiogR4ZxSpj6zLs9v+Bd7Ng2zyK5sj9uJodMvUdJbsr gwYvTngCHmmYPHIaEXzQ0AxjQz7vzxgbzrcsVx5VXC5cYiMu9KXp12lDA57lWHzxqyEo6q BWSA6cRZr5KnQeN9EkQa9KGS02b7w78= Date: Wed, 5 Dec 2018 15:58:14 +0100 From: Borislav Petkov To: Chao Fan Cc: linux-kernel@vger.kernel.org, x86@kernel.org, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, keescook@chromium.org, bhe@redhat.com, msys.mizuma@gmail.com, indou.takao@jp.fujitsu.com, caoj.fnst@cn.fujitsu.com Subject: Re: [PATCH v12 1/5] x86/boot: Add get_acpi_rsdp() to parse RSDP in cmdline from KEXEC Message-ID: <20181205145814.GJ29510@zn.tnic> References: <20181129081631.11139-1-fanc.fnst@cn.fujitsu.com> <20181129081631.11139-2-fanc.fnst@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20181129081631.11139-2-fanc.fnst@cn.fujitsu.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 29, 2018 at 04:16:27PM +0800, Chao Fan wrote: > To fix the conflict between KASLR and memory-hotremove, memory > information in SRAT table is necessary. > > ACPI SRAT (System/Static Resource Affinity Table) can show the details > about memory ranges, including ranges of memory provided by hot-added > memory devices. SRAT table must be introduced by RSDP pointer (Root > System Description Pointer). So RSDP should be found firstly. > > When booting form KEXEC/EFI/BIOS, the methods to find RSDP pointer > are different. When booting from KEXEC, 'acpi_rsdp' may have been > added to cmdline, so parse the cmdline and find the RSDP pointer. > > Signed-off-by: Chao Fan > --- > arch/x86/boot/compressed/acpitb.c | 33 +++++++++++++++++++++++++++++++ > arch/x86/boot/compressed/misc.c | 5 +++++ > arch/x86/boot/compressed/misc.h | 4 ++++ > lib/kstrtox.c | 5 +++++ > 4 files changed, 47 insertions(+) > create mode 100644 arch/x86/boot/compressed/acpitb.c > > diff --git a/arch/x86/boot/compressed/acpitb.c b/arch/x86/boot/compressed/acpitb.c > new file mode 100644 > index 000000000000..614c45655cff > --- /dev/null > +++ b/arch/x86/boot/compressed/acpitb.c Also, I guess calling that file simply "acpi.c" is good enough. > @@ -0,0 +1,33 @@ > +// SPDX-License-Identifier: GPL-2.0 > +#define BOOT_CTYPE_H > +#include "misc.h" > +#include "error.h" > + > +#include > +#include asm/ headers come after linux/ header. ... Thx. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.