Received: by 10.223.185.116 with SMTP id b49csp6033758wrg; Wed, 28 Feb 2018 02:53:15 -0800 (PST) X-Google-Smtp-Source: AH8x225Tuo73ux5eJEXC78QrRA5shRKWzc/gurPCdRGRbyLDwv1SIsV0flqalHo/qi9D4h7TFbZ5 X-Received: by 10.99.94.67 with SMTP id s64mr13937962pgb.312.1519815195649; Wed, 28 Feb 2018 02:53:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519815195; cv=none; d=google.com; s=arc-20160816; b=BoHMwKcsXzLFJMNMw0McoDbsPbjhAW76BJ3TLvGZffzGg+PBxbyQTJ0cV9NuzhJT9d Yrv0Zs24d8YemUgm+CImppVItdPEQtSn4gsUzmQGwi3zXOVxATu9iatqUn8R+65Aj9ET ptmdLkYXTkhXuZ9iZl3vo1ACRMJ2kO92pdaxT3IAaJdhIPlU1AXKGB6mha+TBnBp9W7H ls9jvM1HlQ0Tq25g4iUolBK9Q4lcXGde4S5UGuY6KACbkMh7oYoNjEES4aaRC/dTCes0 +hLrv/QQA/qCXx+hI8o/MR+NNZuKZ9D2dotwYCRr2GNwdXrGS6Hz8EjeyGyzGm6JQpJW Rhbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=cllCae+mt3cry7Ax9gSvG15o/usCdOfSqmfg8CAu2vY=; b=MsCnD2AgeKoukitBmfgL2B11B87X+hcQLC4582dYlAsImhrWxwOvAU6Kpey3URs6oH h0zQz3HhSddnPpDqKkMwtvtOpZIQ3167KuvQdlVE1xHyXXYlqFxDOMNDoqseONRQ+NnC EaU3a1QzsQ40wwfEW3rjKUrTpUtnf3SwDOTpLZoSWg7wKnooI8RckbcrK7Tj7FMY3ajX MhVmeA2B+1xdXeEXOZap/z+y7PB82+ObKq+vd5OLlNMtpr2aSnZ6t66ASDTV/08cdRS6 Iof20iQ12Fgs+opxzV+4qt3YzFGqZfmu8KXZgq2Ik8oqEElbI+3D6kjDeybrOiDKuDtM 4D/Q== 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 m61-v6si1098859plb.500.2018.02.28.02.53.01; Wed, 28 Feb 2018 02:53:15 -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; 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 S1752636AbeB1KwN (ORCPT + 99 others); Wed, 28 Feb 2018 05:52:13 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:39831 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752427AbeB1Kvp (ORCPT ); Wed, 28 Feb 2018 05:51:45 -0500 X-IronPort-AV: E=Sophos;i="5.43,368,1503331200"; d="scan'208";a="37332014" Received: from bogon (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 28 Feb 2018 18:51:43 +0800 Received: from G08CNEXCHPEKD01.g08.fujitsu.local (unknown [10.167.33.80]) by cn.fujitsu.com (Postfix) with ESMTP id 4D149486A796; Wed, 28 Feb 2018 18:51:43 +0800 (CST) Received: from localhost (10.167.225.56) by G08CNEXCHPEKD01.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server id 14.3.361.1; Wed, 28 Feb 2018 18:51:47 +0800 From: Chao Fan To: , , , , , , , CC: , , Chao Fan Subject: [PATCH v9 4/5] x86/KASLR: Skip memory mirror handling if movable_node specified Date: Wed, 28 Feb 2018 18:51:04 +0800 Message-ID: <20180228105105.11487-5-fanc.fnst@cn.fujitsu.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180228105105.11487-1-fanc.fnst@cn.fujitsu.com> References: <20180228105105.11487-1-fanc.fnst@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain X-yoursite-MailScanner-ID: 4D149486A796.A7D8D 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 In kernel code, if 'movable_node' specified, it will skip the mirror feature. So also skip mirror feature in KASLR. Signed-off-by: Chao Fan Acked-by: Baoquan He --- arch/x86/boot/compressed/kaslr.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot/compressed/kaslr.c index 9fb86248d5c5..d19085dbd6f5 100644 --- a/arch/x86/boot/compressed/kaslr.c +++ b/arch/x86/boot/compressed/kaslr.c @@ -698,6 +698,7 @@ static bool process_efi_entries(unsigned long minimum, unsigned long image_size) { struct efi_info *e = &boot_params->efi_info; + char *args = (char *)get_cmd_line_ptr(); bool efi_mirror_found = false; struct mem_vector region; efi_memory_desc_t *md; @@ -731,6 +732,12 @@ process_efi_entries(unsigned long minimum, unsigned long image_size) } } +#ifdef CONFIG_MEMORY_HOTPLUG + /* Skip memory mirror if 'movabale_node' specified */ + if (strstr(args, "movable_node")) + efi_mirror_found = false; +#endif + for (i = 0; i < nr_desc; i++) { md = efi_early_memdesc_ptr(pmap, e->efi_memdesc_size, i); -- 2.14.3