From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932726AbbCDS4G (ORCPT ); Wed, 4 Mar 2015 13:56:06 -0500 Received: from mail-ie0-f175.google.com ([209.85.223.175]:34121 "EHLO mail-ie0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755440AbbCDS4D (ORCPT ); Wed, 4 Mar 2015 13:56:03 -0500 MIME-Version: 1.0 In-Reply-To: References: <1425456048-16236-1-git-send-email-yinghai@kernel.org> <1425456048-16236-5-git-send-email-yinghai@kernel.org> <20150304101649.GA3663@pd.tnic> Date: Wed, 4 Mar 2015 10:56:02 -0800 X-Google-Sender-Auth: BqMAetA8QZHfCkpLFoK-U0R0X8w Message-ID: Subject: Re: [PATCH v2 04/15] x86, kaslr: get kaslr_enabled back correctly From: Yinghai Lu To: Borislav Petkov Cc: Matt Fleming , "H. Peter Anvin" , Bjorn Helgaas , Thomas Gleixner , Ingo Molnar , Jiri Kosina , Borislav Petkov , Baoquan He , Linux Kernel Mailing List , "linux-efi@vger.kernel.org" , "linux-pci@vger.kernel.org" , Kees Cook Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 4, 2015 at 10:06 AM, Yinghai Lu wrote: > On Wed, Mar 4, 2015 at 2:16 AM, Borislav Petkov wrote: >> On Wed, Mar 04, 2015 at 12:00:37AM -0800, Yinghai Lu wrote: >>> commit f47233c2d34f ("x86/mm/ASLR: Propagate base load address calculation") >>> is using address as value for kaslr_enabled. >>> >>> That will random kaslr_enabled get that set or cleared. >>> Will have problem for system really have kaslr enabled. >>> >>> -v2: update changelog. >> >> This is still not good enough. Please do this: >> >> In commit f47233c2d34f we did A. The problem with that is B. Change the >> code to do C. >> >> Now you only have to fill out the A,B and C variables with the >> respective text which is understandable even for people who don't know >> this code. Please check if it is ok: Subject: [PATCH v3] x86, kaslr: get kaslr_enabled back correctly commit f47233c2d34f ("x86/mm/ASLR: Propagate base load address calculation") is using address as value for kaslr_enabled. That will get wrong value for kaslr_enabled, so have problem for system really have kaslr enabled. This patch change to using early map and accessing the value. -v3: add checking about early_memmap according to bp.