Received: by 10.223.148.5 with SMTP id 5csp6672683wrq; Wed, 17 Jan 2018 17:16:08 -0800 (PST) X-Google-Smtp-Source: ACJfBotMHBLFDsv4DWl51t19lKLDOQzwX9EZe+dJIDZZTjUmRwzXmwnt3O8AkPz5AgH0SVKfJ7ky X-Received: by 10.98.186.25 with SMTP id k25mr39765324pff.28.1516238168110; Wed, 17 Jan 2018 17:16:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516238168; cv=none; d=google.com; s=arc-20160816; b=OO/U2qXgbA5aNKZWcGSHEUCqKq2OYYXoBPrkqS1VuyhGiGF/toupY63+3ZHDEJi22w OZ49GD+g07CP3rdxrpRIAh0Md45pBSDlXS68eOfYT/5Ba+iiBzI4cTn1C398nFukS8LD vM/W41r67n6uDOpJg+hb5QMw0mxzsdSFR5zMjinHUt63SAx04i4JOOJ/TisWMNB+K8VZ KT0e3FxrKEHG4DnmQ3m9PDXJtLN8fekS5YV7KMxiurMhnljPjZb3phTn4kGatZ4RCnol 1puhDQQkptIoHkr6Qum19Zh0mJeu70DMkIP7S8jlGMuwijVceAdMT+Ipe5huG2+Jp9Yb lZwQ== 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:arc-authentication-results; bh=cmoTl1vqbAhudlkrMtR81/RSkKUGmtbilXtXuxif6wk=; b=p41KdaxLRViXuoihX9TYQ85DYD5F9KPeCG6S/9mITAe/bfgAyuH9MYD1iFFyhXIXvv 1UEst1EvyA2pMyCLkgqHsY1AF59Syzq+eBrntnz80rG96dlkENyAD3ZXgGOeIuWqz09t OxdnhWC5+p8eBVMccwfy+yGa3TDk8eEcHW/hth+Xw/3jBbIMO1aI8pbOjy6+fXlLrhSQ VwcmTA0YCINkXUFeX6ZYyAjCvMbCV/A2VGW2D+ar4JRJxs9MUIKUFJaBHwohyoTcINN9 Rc2kxZ+jN0EzHO+CPbosDT3Wy+yKPM+7iiW1wVvQ0ljF6ZY9Xp2cCwkLysmppKGu9p5k XuSw== 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 h3si451425pld.110.2018.01.17.17.15.53; Wed, 17 Jan 2018 17:16:08 -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 S1753054AbeARBP0 (ORCPT + 99 others); Wed, 17 Jan 2018 20:15:26 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:45625 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752891AbeARBPX (ORCPT ); Wed, 17 Jan 2018 20:15:23 -0500 X-IronPort-AV: E=Sophos;i="5.43,368,1503331200"; d="scan'208";a="35427017" Received: from bogon (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 18 Jan 2018 09:15:23 +0800 Received: from G08CNEXCHPEKD01.g08.fujitsu.local (unknown [10.167.33.80]) by cn.fujitsu.com (Postfix) with ESMTP id 6D90C480D736; Thu, 18 Jan 2018 09:15:17 +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.361.1; Thu, 18 Jan 2018 09:15:21 +0800 Date: Thu, 18 Jan 2018 09:13:57 +0800 From: Chao Fan To: Baoquan He CC: , , , , , , , , Subject: Re: [PATCH v7 4/5] x86/KASLR: Skip memory mirror handling if movable_node specified Message-ID: <20180118011356.GB24593@localhost.localdomain> References: <20180117105351.12226-1-fanc.fnst@cn.fujitsu.com> <20180117105351.12226-5-fanc.fnst@cn.fujitsu.com> <20180117140354.GH2321@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20180117140354.GH2321@localhost.localdomain> User-Agent: Mutt/1.9.1 (2017-09-22) X-Originating-IP: [10.167.225.56] X-yoursite-MailScanner-ID: 6D90C480D736.A8F55 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, Jan 17, 2018 at 10:03:54PM +0800, Baoquan He wrote: >On 01/17/18 at 06:53pm, Chao Fan wrote: >> In kernel code, if movable_node specified, it will skip the mirror >> feature. So we should also skip mirror feature in KASLR. >> >> Signed-off-by: Chao Fan >> --- >> 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 dca846b522fc..84b9db26d026 100644 >> --- a/arch/x86/boot/compressed/kaslr.c >> +++ b/arch/x86/boot/compressed/kaslr.c >> @@ -692,6 +692,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; >> @@ -725,6 +726,12 @@ process_efi_entries(unsigned long minimum, unsigned long image_size) >> } >> } >> >> +#ifdef CONFIG_MEMORY_HOTPLUG >> + /* Skip memory mirror if movabale_node or immovable_mem specified */ > ~~~~~~~~~~~~~ > ^^ need be removed? Yes, sorry for the mistake, I change the old versions and miss some points. Will change that. Thanks, Chao Fan >> + 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 >> >> >> > >