Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755003AbZGAQyr (ORCPT ); Wed, 1 Jul 2009 12:54:47 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752207AbZGAQyk (ORCPT ); Wed, 1 Jul 2009 12:54:40 -0400 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.123]:38905 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752056AbZGAQyk (ORCPT ); Wed, 1 Jul 2009 12:54:40 -0400 Date: Wed, 1 Jul 2009 12:54:41 -0400 (EDT) From: Steven Rostedt X-X-Sender: rostedt@gandalf.stny.rr.com To: Peter Oberparleiter cc: LKML Subject: [BUG] gcov causes vread_tsc to increment kernel memory Message-ID: User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1239 Lines: 29 On bootup of the latest kernel my init segfaults. Debugging it, I found that vread_tsc (a vsyscall) increments some strange kernel memory: 0000000000000000 : 0: 55 push %rbp 1: 48 ff 05 00 00 00 00 incq 0(%rip) # 8 4: R_X86_64_PC32 .bss+0x3c 8: 48 89 e5 mov %rsp,%rbp b: 66 66 90 xchg %ax,%ax e: 48 ff 05 00 00 00 00 incq 0(%rip) # 15 11: R_X86_64_PC32 .bss+0x44 15: 66 66 90 xchg %ax,%ax 18: 48 ff 05 00 00 00 00 incq 0(%rip) # 1f 1b: R_X86_64_PC32 .bss+0x4c 1f: 0f 31 rdtsc Those "incq" is very bad to happen in vsyscall memory, since userspace can not modify it. You need to make something prevent profiling of vsyscall memory (like I do with ftrace). -- Steve -- 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/