[OE-core] pseudo: host user contamination

Enrico Scholz enrico.scholz at sigma-chemnitz.de
Tue Mar 27 13:06:40 UTC 2018


Andre McCurdy <armccurdy-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org>
writes:

>> Since the man page gave the ia64 example, I went and checked, and it
>> is indeed the case that calls other than syscall(2) will clobber r10
>> after system calls,

I think you are misinterpreting the man-page.  In "Architecture
calling conventions" it documents the calling convention into the
kernel.  syscall(2) itself is an ordinary function which has to
follow the userspace ABI; after jumping into the kernel and setting
'errno' in error case, it restores registers as needed.

Some ABIs allow functions to clobber registers (they are not restored
after leaving the function and do not carry a return value); e.g. on
ARM, these are r0-r3 and r12.  That's probably the case for r10 in ia64
too.



Enrico



More information about the Openembedded-core mailing list