Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754429AbaAUK1L (ORCPT ); Tue, 21 Jan 2014 05:27:11 -0500 Received: from mail-ee0-f51.google.com ([74.125.83.51]:59388 "EHLO mail-ee0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753624AbaAUK1E (ORCPT ); Tue, 21 Jan 2014 05:27:04 -0500 Date: Tue, 21 Jan 2014 11:27:00 +0100 From: Ingo Molnar To: Linus Torvalds , Adrian Hunter , Arnaldo Carvalho de Melo Cc: "H. Peter Anvin" , Arnaldo Carvalho de Melo , Peter Zijlstra , Cong Ding , "H. Peter Anvin" , Ingo Molnar , Kees Cook , Linux Kernel Mailing List , Mathias Krause , Michael Davidson , Thomas Gleixner , Wei Yongjun Subject: Re: [GIT PULL] x86/kaslr for v3.14 Message-ID: <20140121102700.GB2981@gmail.com> References: <201401201647.s0KGlZdh004167@tazenda.hos.anvin.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Linus Torvalds wrote: > On Mon, Jan 20, 2014 at 2:54 PM, Linus Torvalds > wrote: > > So I pulled this, but one question: > > .. oh, and since I decided to test it, and was looking for problems: > enabling kaslr breaks "perf". The *profile* looks fine, but the > disassembly doesn't work. > > I'm not entirely surprised. I decided I wanted to test it for a > reason, after all. So it's not unexpected, but perhaps people hadn't > thought about it, and clearly hadn't tested it. > > Kernel modules disassemble fine, so clearly perf knows about code > that moves around, but apparently it gets surprised when the core > vmlinux file disassembly doesn't match addresses. Hm, live annotation of the kernel image is a relatively new perf feature, and KASLR predated that (by years) - which would at least in part explain why it went unnoticed. (Although it does not excuse the lack of testing.) I've Cc:-ed Adrian Hunter, the author of the /proc/kcore annotation feature. Adrian: enabling x86 KASLR in Linus's latestest kernel via CONFIG_RANDOMIZE_BASE=y [this is also present in the -tip tree] breaks /proc/kcore annotation, because the kernel image position is now per bootup randomized and perf's annotation code gets surprised by that. 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/