x86-64 progress

Robert O'Callahan robert at ocallahan.org
Mon Nov 24 18:24:20 PST 2014


Nathan has done most of the work of course! I've just pitched in to push it
over the line. I've noticed that recent rr bug reports have been from users
using 64-bit builds so I think we should get that officially "done" ASAP.

I've implemented dynamic syscall patching for both x86 and x86-64. On
x86-64 we don't have a single place to hook libc system calls the way we do
on x86, instead inline "syscall" instructions are scattered around libc. To
avoid having to locate those instructions statically, dynamic syscall
patching observes syscall invocations and tries to patch the syscall
invocation instruction as it's executed. We actually abort the current
system call, patch the instruction, reset the program counter and resume
execution of the patched code. A new PATCH_SYSCALL trace event records when
this happens. It's all quite simple, just a few hundred lines of code. On
x86 this doesn't get used much but we do patch a few inline syscalls in
libpthread; I mainly implemented 32-bit support to ensure more thorough
testing.

With that, plus a few extra fixes, I now have all tests passing on x86-64
and I've pushed that to master.

A few things I'd like to do before releasing rr 3.0:
-- Support multi-arch recordings with a 64-bit rr build.
-- Have "make check" with a 64-bit build run all tests in both 32-bit and
64-bit.
-- Check performance to make sure 64-bit performs well. I don't think
anyone's looked at it yet and we might be leaving perf on the table.
-- Do some debugging of 64-bit Firefox.
-- Flip the default build to 64-bit.

In issue #1378 we have problems with rr running on a PaX/grsecurity kernel.
I'll try to fix that for 3.0 if it can be fixed easily.

Rob
-- 
oIo otoeololo oyooouo otohoaoto oaonoyooonoeo owohooo oioso oaonogoroyo
owoiotoho oao oboroootohoeoro oooro osoiosotoeoro owoiololo oboeo
osouobojoeocoto otooo ojouodogomoeonoto.o oAogoaoiono,o oaonoyooonoeo
owohooo
osoaoyoso otooo oao oboroootohoeoro oooro osoiosotoeoro,o o‘oRoaocoao,o’o
oioso
oaonosowoeoroaoboloeo otooo otohoeo ocooouoroto.o oAonodo oaonoyooonoeo
owohooo
osoaoyoso,o o‘oYooouo ofooooolo!o’o owoiololo oboeo oiono odoaonogoeoro
ooofo
otohoeo ofoioroeo ooofo ohoeololo.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rr-dev/attachments/20141125/08a43dce/attachment.html>


More information about the rr-dev mailing list