From mboxrd@z Thu Jan 1 00:00:00 1970 Reply-To: kernel-hardening@lists.openwall.com References: <1462225276-106993-1-git-send-email-thgarnie@google.com> <1462225276-106993-4-git-send-email-thgarnie@google.com> From: Dave Hansen Message-ID: <5727CE13.6090308@linux.intel.com> Date: Mon, 2 May 2016 15:00:51 -0700 MIME-Version: 1.0 In-Reply-To: <1462225276-106993-4-git-send-email-thgarnie@google.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: [kernel-hardening] Re: [PATCH v2 3/4] x86, boot: Implement ASLR for kernel memory sections (x86_64) To: Thomas Garnier , "H . Peter Anvin" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Andy Lutomirski , Dmitry Vyukov , Paolo Bonzini , Dan Williams , Kees Cook , Stephen Smalley , Kefeng Wang , Jonathan Corbet , Matt Fleming , Toshi Kani , Alexander Kuleshov , Alexander Popov , Joerg Roedel , Dave Young , Baoquan He , Mark Salter , Boris Ostrovsky Cc: x86@kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, gthelen@google.com, kernel-hardening@lists.openwall.com List-ID: On 05/02/2016 02:41 PM, Thomas Garnier wrote: > -#define __PAGE_OFFSET _AC(0xffff880000000000, UL) > +#define __PAGE_OFFSET_BASE _AC(0xffff880000000000, UL) > +#ifdef CONFIG_RANDOMIZE_MEMORY > +#define __PAGE_OFFSET page_offset_base > +#else > +#define __PAGE_OFFSET __PAGE_OFFSET_BASE > +#endif /* CONFIG_RANDOMIZE_MEMORY */ Do you have any data about the performance impact of this change? It's not necessary to have it to merge something like this, I'm just curious how bad it is. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755243AbcEBWAz (ORCPT ); Mon, 2 May 2016 18:00:55 -0400 Received: from mga14.intel.com ([192.55.52.115]:50787 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755061AbcEBWAx (ORCPT ); Mon, 2 May 2016 18:00:53 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,569,1455004800"; d="scan'208";a="967245848" Subject: Re: [PATCH v2 3/4] x86, boot: Implement ASLR for kernel memory sections (x86_64) To: Thomas Garnier , "H . Peter Anvin" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Andy Lutomirski , Dmitry Vyukov , Paolo Bonzini , Dan Williams , Kees Cook , Stephen Smalley , Kefeng Wang , Jonathan Corbet , Matt Fleming , Toshi Kani , Alexander Kuleshov , Alexander Popov , Joerg Roedel , Dave Young , Baoquan He , Mark Salter , Boris Ostrovsky References: <1462225276-106993-1-git-send-email-thgarnie@google.com> <1462225276-106993-4-git-send-email-thgarnie@google.com> Cc: x86@kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, gthelen@google.com, kernel-hardening@lists.openwall.com From: Dave Hansen Message-ID: <5727CE13.6090308@linux.intel.com> Date: Mon, 2 May 2016 15:00:51 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <1462225276-106993-4-git-send-email-thgarnie@google.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/02/2016 02:41 PM, Thomas Garnier wrote: > -#define __PAGE_OFFSET _AC(0xffff880000000000, UL) > +#define __PAGE_OFFSET_BASE _AC(0xffff880000000000, UL) > +#ifdef CONFIG_RANDOMIZE_MEMORY > +#define __PAGE_OFFSET page_offset_base > +#else > +#define __PAGE_OFFSET __PAGE_OFFSET_BASE > +#endif /* CONFIG_RANDOMIZE_MEMORY */ Do you have any data about the performance impact of this change? It's not necessary to have it to merge something like this, I'm just curious how bad it is.