Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750890AbeAOWku (ORCPT + 1 other); Mon, 15 Jan 2018 17:40:50 -0500 Received: from merlin.infradead.org ([205.233.59.134]:44394 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750732AbeAOWkt (ORCPT ); Mon, 15 Jan 2018 17:40:49 -0500 Subject: Re: [PATCH v6 1/5] kaslr: add kaslr_mem=nn[KMG]@ss[KMG] to specify extracting memory To: Chao Fan , linux-kernel@vger.kernel.org, x86@kernel.org, hpa@zytor.com, tglx@linutronix.de, mingo@redhat.com, bhe@redhat.com, keescook@chromium.org, yasu.isimatu@gmail.com Cc: indou.takao@jp.fujitsu.com, lcapitulino@redhat.com References: <20180115124016.17683-1-fanc.fnst@cn.fujitsu.com> <20180115124016.17683-2-fanc.fnst@cn.fujitsu.com> From: Randy Dunlap Message-ID: <5caa647b-22cb-6b77-eb4c-bd0ef1f70b7f@infradead.org> Date: Mon, 15 Jan 2018 14:40:35 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180115124016.17683-2-fanc.fnst@cn.fujitsu.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 01/15/2018 04:40 AM, Chao Fan wrote: > In current code, kaslr only has a method to avoid some memory regions, > but no method to specify the regions for kaslr to extract. So kaslr > may choose the wrong position sometimes, which will cause some other > features fail. > > Here is a problem that kaslr may choose the memory region in movable > nodes to extract kernel, which will make the nodes can't be hot-removed. > To solve it, we can specify the memory region in immovable node. > Create "kaslr_mem=" to store the regions in immovable nodes, where should > be chosen by kaslr. > > Also change the "handle_mem_memmap" to "handle_mem_filter", since > it will not only handle memmap parameter now. Hi, Are any of the kernel command-line parameters documented anywhere? Thanks. > Multiple regions can be specified, comma delimited. > Considering the usage of memory, only support for 4 regions. > 4 regions contains 2 nodes at least, enough for kernel to extract. > > Signed-off-by: Chao Fan > --- > arch/x86/boot/compressed/kaslr.c | 73 ++++++++++++++++++++++++++++++++++++++-- > 1 file changed, 70 insertions(+), 3 deletions(-) -- ~Randy