From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754053AbdDQNfN (ORCPT ); Mon, 17 Apr 2017 09:35:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51790 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753167AbdDQNfJ (ORCPT ); Mon, 17 Apr 2017 09:35:09 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2E941C057FA4 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=bhe@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 2E941C057FA4 From: Baoquan He To: linux-kernel@vger.kernel.org Cc: keescook@chromium.org, dave.jiang@intel.com, dan.j.williams@intel.com, hpa@zytor.com, tglx@linutronix.de, mingo@kernel.org, dyoung@redhat.com, Baoquan He Subject: [PATCH 0/4] Handle memmap and mem kernel options in boot stage kaslr Date: Mon, 17 Apr 2017 21:34:55 +0800 Message-Id: <1492436099-4017-1-git-send-email-bhe@redhat.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 17 Apr 2017 13:35:09 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org People reported kernel panic occurs during system boots up with mem boot option. After checking code, several problems are found about memmap= and mem= in boot stage kaslr. *) In commit f28442497b5c ("x86/boot: Fix KASLR and memmap= collision"), only one memmap entry is considered and only the last one if multiple memmap entries are specified. *) mem= and memmap=nn[KMG] are not considered yet. They are used to limit max address of system. Kernel can't be randomized to be above the limit. *) kernel-parameters.txt doesn't tell the updated behaviour of memmap=. This patchset tries to solve above issues. Baoquan He (4): param: Move function next_arg to lib/cmdline.c for later reuse KASLR: Parse all memmap entries in cmdline KASLR: Handle memory limit specified by memmap and mem option doc: Update description about memmap option in kernel-parameter.txt Documentation/admin-guide/kernel-parameters.txt | 9 ++ arch/x86/boot/compressed/cmdline.c | 2 +- arch/x86/boot/compressed/kaslr.c | 161 ++++++++++++++---------- arch/x86/boot/string.c | 8 ++ include/linux/kernel.h | 1 + kernel/params.c | 52 -------- lib/cmdline.c | 57 +++++++++ 7 files changed, 172 insertions(+), 118 deletions(-) -- 2.5.5