Peter Oberparleiter
f386c61fe1
gcov: exclude code operating in userspace from profiling
Fix for this issue on x86_64:
rostedt@goodmis.org wrote:
> On bootup of the latest kernel my init segfaults. Debugging it,
> I found that vread_tsc (a vsyscall) increments some strange
> kernel memory:
>
> 0000000000000000 <vread_tsc>:
> 0: 55 push %rbp
> 1: 48 ff 05 00 00 00 00 incq 0(%rip)
> # 8 <vread_tsc+0x8>
> 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 <vread_tsc+0x15>
> 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 <vread_tsc+0x1f>
> 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).
Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Reported-by: Steven Rostedt <rostedt@goodmis.org>
Tested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-07-06 13:57:03 -07:00
..
2009-06-20 10:49:48 -07:00
2009-06-10 15:30:41 -07:00
2009-06-18 19:44:01 +08:00
2009-04-30 21:16:49 +02:00
2009-07-02 12:05:10 -07:00
2009-07-06 13:57:03 -07:00
2009-06-28 14:10:32 +03:00
2009-06-12 22:27:08 +09:30
2009-06-25 16:47:40 -07:00
2009-03-27 17:28:43 +01:00
2009-06-30 18:56:01 -07:00
2009-06-11 17:55:42 +02:00
2009-06-24 16:23:03 -07:00
2009-06-23 13:36:17 -07:00
2009-06-18 13:03:58 -07:00
2009-06-10 16:16:27 -07:00
2009-04-16 18:09:02 +02:00
2009-06-29 12:37:44 +01:00
2009-06-11 00:32:00 +02:00
2009-06-15 15:49:17 +02:00
2009-06-13 15:37:30 +02:00