Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1765520Ab3DEXSv (ORCPT ); Fri, 5 Apr 2013 19:18:51 -0400 Received: from mail-oa0-f47.google.com ([209.85.219.47]:49800 "EHLO mail-oa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759881Ab3DEXSu (ORCPT ); Fri, 5 Apr 2013 19:18:50 -0400 MIME-Version: 1.0 In-Reply-To: <20130405204306.GA14092@pd.tnic> References: <1365106055-22939-1-git-send-email-keescook@chromium.org> <1365106055-22939-4-git-send-email-keescook@chromium.org> <20130405144954.GC29290@pd.tnic> <20130405204306.GA14092@pd.tnic> Date: Fri, 5 Apr 2013 16:18:49 -0700 X-Google-Sender-Auth: fk6TXHAxrzZiQb6n9cEzgU9jGhw Message-ID: Subject: Re: [PATCH 3/3] x86: kernel base offset ASLR From: Kees Cook To: Borislav Petkov , Julien Tinnes , Kees Cook , LKML , "kernel-hardening@lists.openwall.com" , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , "x86@kernel.org" , Jarkko Sakkinen , Matthew Garrett , Matt Fleming , Eric Northup , Dan Rosenberg , Will Drewry Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1189 Lines: 33 On Fri, Apr 5, 2013 at 1:43 PM, Borislav Petkov wrote: > On Fri, Apr 05, 2013 at 01:19:39PM -0700, Julien Tinnes wrote: >> I think it'd be perfectly ok for OOPS to print out the kernel base. > > Yeah, ok, this still would need some massaging of the oops output per > script, but it shouldn't be a big problem. > > Also, you probably need to make clear in the oops itself that the > addresses have been randomized. Or, is the mere presence of kernel base > going to imply that? There is already a hook in the patch that prints the offset: +dump_kernel_offset(struct notifier_block *self, unsigned long v, void *p) +{ + pr_emerg("Kernel Offset: 0x%lx\n", + (unsigned long)&_text - __START_KERNEL); ... + atomic_notifier_chain_register(&panic_notifier_list, + &kernel_offset_notifier); But of course, this can get improved. -Kees -- Kees Cook Chrome OS Security -- 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/