[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git-commits-head
Subject:    x86: Put back -pg to tsc.o and add no GCOV to vread_tsc_64.o
From:       Linux Kernel Mailing List <linux-kernel () vger ! kernel ! org>
Date:       2011-05-31 11:59:16
Message-ID: 201105311159.p4VBxGUe028284 () hera ! kernel ! org
[Download RAW message or body]

Gitweb:     http://git.kernel.org/linus/89e1be50c68eb5e58b873dce87bbac627ee18d1f
Commit:     89e1be50c68eb5e58b873dce87bbac627ee18d1f
Parent:     f23a5e1405e47df6cdc86568ea75df266b9e151f
Author:     Steven Rostedt <srostedt@redhat.com>
AuthorDate: Fri May 27 23:11:24 2011 -0400
Committer:  Steven Rostedt <rostedt@goodmis.org>
CommitDate: Fri May 27 23:47:16 2011 -0400

    x86: Put back -pg to tsc.o and add no GCOV to vread_tsc_64.o
    
    The commit 44259b1abfaa8bb819d25d41d71e8e33e25dd36a
        Author: Andy Lutomirski <luto@MIT.EDU>
        x86-64: Move vread_tsc into a new file with sensible options
    
    Removed the -pg from tsc.o which caused the function graph tracer
    to go into an infinite function call recursion as it uses the tsc
    internally outside its recursion protection, thus tracing the tsc
    breaks the function graph tracer.
    
    This commit also added the file vread_tsc_64.c that gets used
    by vdso but failed to prevent GCOV from monkeying with it,
    causing userspace to try to access kernel data when GCOV was
    enabled.
    
    Thanks to Thomas Gleixner for pointing out GCOV as the likely
    culprit that added strange kernel accesses into the vread_tsc()
    call.
    
    Cc: Author: Andy Lutomirski <luto@MIT.EDU>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 arch/x86/kernel/Makefile |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index f5abe3a..90b06d4 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -8,6 +8,7 @@ CPPFLAGS_vmlinux.lds += -U$(UTS_MACHINE)
 
 ifdef CONFIG_FUNCTION_TRACER
 # Do not profile debug and lowlevel utilities
+CFLAGS_REMOVE_tsc.o = -pg
 CFLAGS_REMOVE_rtc.o = -pg
 CFLAGS_REMOVE_paravirt-spinlocks.o = -pg
 CFLAGS_REMOVE_pvclock.o = -pg
@@ -28,6 +29,7 @@ CFLAGS_paravirt.o	:= $(nostackp)
 GCOV_PROFILE_vsyscall_64.o	:= n
 GCOV_PROFILE_hpet.o		:= n
 GCOV_PROFILE_tsc.o		:= n
+GCOV_PROFILE_vread_tsc_64.o	:= n
 GCOV_PROFILE_paravirt.o		:= n
 
 # vread_tsc_64 is hot and should be fully optimized:
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic