It\'s the same as this one except that I\'m running execl(\"/bin/ls\", \"ls\", NULL);.
The result is obviously wrong as every syscall returns with
At a punt I'd say you're examining eax, or its 64 bit equivalent (presumably rax) for the return code of a system call. There's an additional slot for saving this register named orig_eax, used for restarting system calls.
I poked around into this stuff quite a lot but can't for the life of me locate my findings. Here are some related questions:
Poking around again it seems my memory serves correct. You'll find everything you need right here in the kernel source (the main site is down, fortunately torvalds now mirrors linux at github).