Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753472AbdIDJEK (ORCPT ); Mon, 4 Sep 2017 05:04:10 -0400 Received: from mail.cn.fujitsu.com ([183.91.158.132]:49836 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753318AbdIDJEJ (ORCPT ); Mon, 4 Sep 2017 05:04:09 -0400 X-IronPort-AV: E=Sophos;i="5.41,474,1498492800"; d="scan'208";a="25186258" Date: Mon, 4 Sep 2017 17:03:57 +0800 From: Chao Fan To: Baoquan He CC: Dou Liyang , "Rafael J. Wysocki" , , , , , , , , , , , , , , Subject: Re: [PATCH v2] kaslr: get ACPI SRAT table to avoid movable memory Message-ID: <20170904090357.GB10604@localhost.localdomain> References: <20170903143123.22031-1-fanc.fnst@cn.fujitsu.com> <2895411.GR6mzpbNLk@aspire.rjw.lan> <20170904022619.GB30906@x1> <4f2f9d6e-8d6e-e518-bcb6-493d898b7341@cn.fujitsu.com> <20170904083914.GD30906@x1> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20170904083914.GD30906@x1> User-Agent: Mutt/1.8.3 (2017-05-23) X-Originating-IP: [10.167.226.75] X-yoursite-MailScanner-ID: 479174725541.A8CAD 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 Content-Length: 1410 Lines: 52 On Mon, Sep 04, 2017 at 04:39:14PM +0800, Baoquan He wrote: >On 09/04/17 at 04:17pm, Dou Liyang wrote: >> With "movable_node=1024M" option in cmdline, KASLR will can't access >> the node3 memory. > >So you have extended the movable_node option from no value specified to >adding a limit value, then why don't you go one step further to extend >it as movable_node=xxx@start. With this, you can eat the cake you have. > >My personal opinion, could that other peopel have better idea. But dig >into acpi tables to grab the srat table, that is really not a good idea. > >Chao has spent time to know the srat table, maybe he can try to make a >patch with the "movable_node=xxx@start" handling in kaslr.c, let's see >what it looks like. Hi Bao That means the user should know the detail information of the srat table, including the memory location and length. But I have no idea that if it's elegant leaving it for users to fill the parameter. BTW, it may be like this: "movable_node=xxx@start,xxx@start,..." And I was also wondering if anyone has a better solution. Thanks, Chao Fan > >Thanks >Baoquan > >> >> I am looking for the solution of this. Not find a good way. >> >> Sometimes, I will remember that proverb: >> >> You cannot have your cake and eat it too. :-) >> >> Thanks, >> dou. >> > touch ACPI tables with so many lines of code. >> > >> > Thanks >> > Baoquan >> > >> > >> > >> >> > >