Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751205AbeAPBRF (ORCPT + 1 other); Mon, 15 Jan 2018 20:17:05 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:50127 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750868AbeAPBRD (ORCPT ); Mon, 15 Jan 2018 20:17:03 -0500 X-IronPort-AV: E=Sophos;i="5.43,368,1503331200"; d="scan'208";a="35346348" Date: Tue, 16 Jan 2018 09:16:03 +0800 From: Chao Fan To: Randy Dunlap CC: , , , , , , , , , Subject: Re: [PATCH v6 1/5] kaslr: add kaslr_mem=nn[KMG]@ss[KMG] to specify extracting memory Message-ID: <20180116011603.GH13719@localhost.localdomain> References: <20180115124016.17683-1-fanc.fnst@cn.fujitsu.com> <20180115124016.17683-2-fanc.fnst@cn.fujitsu.com> <5caa647b-22cb-6b77-eb4c-bd0ef1f70b7f@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <5caa647b-22cb-6b77-eb4c-bd0ef1f70b7f@infradead.org> User-Agent: Mutt/1.9.1 (2017-09-22) X-Originating-IP: [10.167.225.56] X-yoursite-MailScanner-ID: 2645B48AEA0D.AB01C X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: fanc.fnst@cn.fujitsu.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Mon, Jan 15, 2018 at 02:40:35PM -0800, Randy Dunlap wrote: >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? Hi, Sorry for that, not yet. Because the patchset has been discussed in mailing list for a long time, and changed for many times, I want to add the document after this version has been merged or ACKed. Thanks, Chao Fan > >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 > >