lkml.org 
[lkml]   [2009]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[BUG] gcov causes vread_tsc to increment kernel memory

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).

-- Steve



\
 
 \ /
  Last update: 2009-07-01 18:57    [W:1.205 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site