From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753223AbcLJM2C (ORCPT ); Sat, 10 Dec 2016 07:28:02 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45782 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752323AbcLJM2B (ORCPT ); Sat, 10 Dec 2016 07:28:01 -0500 Date: Sat, 10 Dec 2016 20:27:57 +0800 From: Baoquan He To: Borislav Petkov Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de, hpa@zytor.com, mingo@redhat.com, x86@kernel.org, keescook@chromium.org, yinghai@kernel.org, thgarnie@google.com, kuleshovmail@gmail.com, luto@kernel.org, mcgrof@kernel.org, anderson@redhat.com, dyoung@redhat.com, xlpang@redhat.com Subject: Re: [PATCH v2 2/2] x86/KASLR/64: Determine kernel text mapping size at runtime Message-ID: <20161210122757.GE1034@x1> References: <1481294518-29595-1-git-send-email-bhe@redhat.com> <1481294518-29595-3-git-send-email-bhe@redhat.com> <20161210103151.56d7k2iwwwu5acmw@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161210103151.56d7k2iwwwu5acmw@pd.tnic> User-Agent: Mutt/1.7.0 (2016-08-17) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Sat, 10 Dec 2016 12:28:01 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/10/16 at 11:31am, Borislav Petkov wrote: > On Fri, Dec 09, 2016 at 10:41:58PM +0800, Baoquan He wrote: > > X86 64 kernel takes KERNEL_IMAGE_SIZE as the kernel text mapping size, > > and it's fixed as compiling time, changing from 512M to 1G as long as > > CONFIG_RANDOMIZE_BASE is enabled, though people specify kernel option > > "nokaslr" explicitly. > > > > This could be a wrong behaviour. > > A bunch of changes just because "this could be a wrong behavior". I'm > not really persuaded. Well, then apologize for this wrong expression. It should be "This is a wrong behaviour." Whether CONFIG_RANDOMIZE_BASE is yes or not, with 'nokaslr' specified, Kernel text mapping size should be 512M, just the same as no kaslr code compiled in. Thanks Baoquan