Closed GoogleCodeExporter closed 9 years ago
Original comment by mseaborn@chromium.org
on 15 Nov 2011 at 5:49
libc.so contains a couple of unconditional calls to the vsyscall page that we
need to patch, for time() and sched_getcpu().
$ objdump -d /lib/libc.so.6
...
0000000000099ed0 <time>:
99ed0: 48 83 ec 08 sub $0x8,%rsp
99ed4: 48 c7 c0 00 04 60 ff mov $0xffffffffff600400,%rax
99edb: ff d0 callq *%rax
99edd: 48 83 c4 08 add $0x8,%rsp
99ee1: c3 retq
...
This definitely breaks on Linux 3.1, where vtime always executes a SYSCALL
instruction.
I suggest we handle these two cases by making the patcher look for this
instruction sequence:
mov $0xffffffffff600x00,%rax
callq *%rax
Original comment by mseaborn@chromium.org
on 15 Nov 2011 at 6:15
Original comment by mseaborn@chromium.org
on 17 Nov 2011 at 5:09
Fixed in r178.
Original comment by mseaborn@chromium.org
on 19 Nov 2011 at 4:31
Original issue reported on code.google.com by
mseaborn@chromium.org
on 15 Nov 2011 at 5:10