summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/mips/syscall_error.S
AgeCommit message (Collapse)Author
2012-11-18Replace FSF snail mail address with URLsMike Frysinger
This matches a similar change made to glibc. No functional changes here. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-06-06MIPS: Use $a0 instead of $v0 for __syscall_error() argumentKevin Cernekee
$a0 is saved across _dl_runtime_resolve(); $v0 is not. Unfortunately, __syscall_error() uses $v0 for its argument, not $a0 as is the MIPS ABI standard. This means that if lazy binding was used for __syscall_error(), the errno value in $v0 could get corrupted. The problem can be easily seen in testcases where syscalls in librt fail; when librt tries to call __syscall_error() in libc, the argument gets lost and errno gets set to a bogus value: # ./tst-mqueue1 ; echo $? mq_receive on O_WRONLY mqd_t did not fail with EBADF: Unknown error 2004684208 1 # ./tst-mqueue2 ; echo $? mq_timedreceive with too small msg_len did not fail with EMSGSIZE: Unknown error 1997360560 1 # ./tst-mqueue4 ; echo $? mq_timedsend did not fail with ETIMEDOUT: Unknown error 2008747440 1 When _dl_runtime_resolve() was taken out of the equation, the same test cases passed: # LD_BIND_NOW=y ./tst-mqueue1 ; echo $? 0 # LD_BIND_NOW=y ./tst-mqueue2 ; echo $? 0 # LD_BIND_NOW=y ./tst-mqueue4 ; echo $? 0 Changing __syscall_error() to look at $a0 instead of $v0 fixed the problem. (Note that there is also a "__syscall_error.c" file which presumably uses the standard C calling conventions, but I do not think it is used on MIPS.) Signed-off-by: Kevin Cernekee <cernekee@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-06-30mips/syscall-error: Choose the correct version for setting up errno.Khem Raj
* Current function is a C protype and PSEUDO macro does not transfer syscall return parameters to correct argument registers for a C function. This causes problem with syscalls setting wrong value for errno when they encounter an error. * Fixes PR/2089 for mips/nptl Signed-off-by: Khem Raj <raj.khem@gmail.com>
2009-10-17whitespace fixesAustin Foxley
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2009-10-17mips specific bits needed for nptlAustin Foxley
* vfork impl with support for SAVE_PID, RESTORE_PID * sysdep.h assembly macros Signed-off-by: Austin Foxley <austinf@cetoncorp.com>