Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752683AbbDBLHV (ORCPT ); Thu, 2 Apr 2015 07:07:21 -0400 Received: from mail-wi0-f178.google.com ([209.85.212.178]:37237 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750771AbbDBLHS (ORCPT ); Thu, 2 Apr 2015 07:07:18 -0400 Date: Thu, 2 Apr 2015 13:07:13 +0200 From: Ingo Molnar To: Borislav Petkov Cc: LKML , Kees Cook , x86-ml , "H. Peter Anvin" , Thomas Gleixner Subject: Re: [PATCH v1.1] x86/mm/ASLR: Propagate ASLR status to kernel proper Message-ID: <20150402110713.GA29311@gmail.com> References: <1427885970-14240-1-git-send-email-bp@alien8.de> <20150402040352.GA3483@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150402040352.GA3483@pd.tnic> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1344 Lines: 51 * Borislav Petkov wrote: > --- a/arch/x86/kernel/module.c > +++ b/arch/x86/kernel/module.c > @@ -33,6 +33,7 @@ > > #include > #include > +#include > > #if 0 > #define DEBUGP(fmt, ...) \ > @@ -47,21 +48,13 @@ do { \ > > #ifdef CONFIG_RANDOMIZE_BASE > static unsigned long module_load_offset; > -static int randomize_modules = 1; > > /* Mutex protects the module_load_offset. */ > static DEFINE_MUTEX(module_kaslr_mutex); > > -static int __init parse_nokaslr(char *p) > -{ > - randomize_modules = 0; > - return 0; > -} > -early_param("nokaslr", parse_nokaslr); So doesn't a 'nokaslr' boot option still make sense, to be able to debug KASLR failures and such? > + if (kaslr_enabled()) > + pr_emerg("Kernel Offset: 0x%lx from 0x%lx (relocation range: 0x%lx-0x%lx)\n", > + (unsigned long)&_text - __START_KERNEL, > + __START_KERNEL, > + __START_KERNEL_map, > + MODULES_VADDR-1); > + else > + pr_emerg("Kernel Offset: disabled\n"); Nit: curly braces for multi-line statements and so. Thanks, Ingo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/