From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751992AbdAYKsH (ORCPT ); Wed, 25 Jan 2017 05:48:07 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:45321 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751695AbdAYKsG (ORCPT ); Wed, 25 Jan 2017 05:48:06 -0500 Date: Wed, 25 Jan 2017 11:47:47 +0100 (CET) From: Thomas Gleixner To: Dave Jiang cc: mingo@redhat.com, hpa@zytor.com, keescook@chromium.org, bhe@redhat.com, linux-nvdimm@ml01.01.org, x86@kernel.org, david@fromorbit.com, linux-kernel@vger.kernel.org, dan.j.williams@intel.com Subject: Re: [PATCH v7] x86: fix kaslr and memmap collision In-Reply-To: <148417664156.131935.2248592164852799738.stgit@djiang5-desk3.ch.intel.com> Message-ID: References: <148417664156.131935.2248592164852799738.stgit@djiang5-desk3.ch.intel.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 11 Jan 2017, Dave Jiang wrote: > CONFIG_RANDOMIZE_BASE relocates the kernel to a random base address. > However it does not take into account the memmap= parameter passed in from > the kernel cmdline. This results in the kernel sometimes being put in > the middle of memmap. Teaching kaslr to not insert the kernel in > memmap defined regions. We will support up to 4 memmap regions. Any > additional regions will cause kaslr to disable. The mem_avoid set has > been augmented to add up to 4 unusable regions of memmaps provided by the > user to exclude those regions from the set of valid address range to insert > the uncompressed kernel image. The nn@ss ranges will be skipped by the > mem_avoid set since it indicates memory useable. > > Signed-off-by: Dave Jiang > Acked-by: Kees Cook > Acked-by: Baoquan He Reviewed-by: Thomas Gleixner