notes icon indicating copy to clipboard operation
notes copied to clipboard

Fix calling convention and return value

Open kawaii-ghost opened this issue 2 years ago • 0 comments

System Call calling convention on System V x86-64 parameter is r10 while the usespace function calling convention is rcx.

Actually, Linux system call is return 128 bit (x86-64), 64 bit (i386) value. RDX as upper bits and EDX as upper bits. They're not changed if the value if rax / eax is enough to hold the return value.

kawaii-ghost avatar Nov 01 '22 00:11 kawaii-ghost