#
fb084237 |
| 05-Jan-2022 |
Richard Henderson <richard.henderson@linaro.org> |
common-user: Really fix i386 calls to safe_syscall_set_errno_tail
Brown bag time: offset 0 from esp is the return address, offset 4 is the first argument.
Fixes: d7478d4229f0 ("common-user: Fix tai
common-user: Really fix i386 calls to safe_syscall_set_errno_tail
Brown bag time: offset 0 from esp is the return address, offset 4 is the first argument.
Fixes: d7478d4229f0 ("common-user: Fix tail calls to safe_syscall_set_errno_tail") Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
d7478d42 |
| 04-Jan-2022 |
Richard Henderson <richard.henderson@linaro.org> |
common-user: Fix tail calls to safe_syscall_set_errno_tail
For the ABIs in which the syscall return register is not also the first function argument register, move the errno value into the correct p
common-user: Fix tail calls to safe_syscall_set_errno_tail
For the ABIs in which the syscall return register is not also the first function argument register, move the errno value into the correct place.
Fixes: a3310c0397e2 ("linux-user: Move syscall error detection into safe_syscall_base") Reported-by: Laurent Vivier <laurent@vivier.eu> Tested-by: Laurent Vivier <laurent@vivier.eu> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220104190454.542225-1-richard.henderson@linaro.org>
show more ...
|
#
5bfd125e |
| 23-Nov-2021 |
Richard Henderson <richard.henderson@linaro.org> |
common-user: Adjust system call return on FreeBSD
FreeBSD system calls return positive errno. On the 4 hosts for which we have support, error is indicated by the C bit set or clear.
Reviewed-by: W
common-user: Adjust system call return on FreeBSD
FreeBSD system calls return positive errno. On the 4 hosts for which we have support, error is indicated by the C bit set or clear.
Reviewed-by: Warner Losh <imp@bsdimp.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
bbf15aaf |
| 17-Nov-2021 |
Richard Henderson <richard.henderson@linaro.org> |
common-user: Move safe-syscall.* from linux-user
Move linux-user safe-syscall.S and safe-syscall-error.c to common-user so that bsd-user can also use it. Also move safe-syscall.h to include/user/.
common-user: Move safe-syscall.* from linux-user
Move linux-user safe-syscall.S and safe-syscall-error.c to common-user so that bsd-user can also use it. Also move safe-syscall.h to include/user/. Since there is nothing here that is related to the guest, as opposed to the host, build it once.
Reviewed-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
af254a27 |
| 22-Nov-2021 |
Richard Henderson <richard.henderson@linaro.org> |
linux-user: Rename TARGET_ERESTARTSYS to QEMU_ERESTARTSYS
This value is fully internal to qemu, and so is not a TARGET define. We use this as an extra marker for both host and target errno.
Reviewe
linux-user: Rename TARGET_ERESTARTSYS to QEMU_ERESTARTSYS
This value is fully internal to qemu, and so is not a TARGET define. We use this as an extra marker for both host and target errno.
Reviewed-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
a3310c03 |
| 15-Nov-2021 |
Richard Henderson <richard.henderson@linaro.org> |
linux-user: Move syscall error detection into safe_syscall_base
The current api from safe_syscall_base() is to return -errno, which is the interface provided by *some* linux kernel abis. The wrappe
linux-user: Move syscall error detection into safe_syscall_base
The current api from safe_syscall_base() is to return -errno, which is the interface provided by *some* linux kernel abis. The wrapper macro, safe_syscall(), detects error, stores into errno, and returns -1, to match the api of the system syscall().
For those kernel abis that do not return -errno natively, this leads to double syscall error detection. E.g. Linux ppc64, which sets the SO flag for error.
Simplify the usage from C by moving the error detection into assembly, and usage from assembly by providing a C helper with which to set errno.
Reviewed-by: Warner Losh <imp@bsdimp.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
b9d2af3c |
| 23-Nov-2021 |
Richard Henderson <richard.henderson@linaro.org> |
linux-user: Untabify all safe-syscall.inc.S
Reviewed-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Suggested-by: Peter Maydell <peter.maydell@linaro.org> Sig
linux-user: Untabify all safe-syscall.inc.S
Reviewed-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Suggested-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
4aa3f4dd |
| 08-Jul-2016 |
Richard Henderson <rth@twiddle.net> |
linux-user: Fix i386 safe-syscall.S
Clang insists that "cmp" is ambiguous with a memory destination, requiring an explicit size suffix.
There was a true error in the use of .cfi_def_cfa_offset in t
linux-user: Fix i386 safe-syscall.S
Clang insists that "cmp" is ambiguous with a memory destination, requiring an explicit size suffix.
There was a true error in the use of .cfi_def_cfa_offset in the epilogue, but changing to use the proper .cfi_adjust_cfa_offset runs afoul of a clang bug wrt .cfi_restore_state. Better to fold the two epilogues so that we don't trigger the bug.
Signed-off-by: Richard Henderson <rth@twiddle.net>
show more ...
|
#
5d3acaf8 |
| 22-Jun-2016 |
Richard Henderson <rth@twiddle.net> |
linux-user: Provide safe_syscall for i386
Signed-off-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
|