On Mon, Jun 06, 2016 at 07:58:01PM +0100, Peter Maydell wrote: > This set of pretty dull patches extends the use of the safe_syscall > wrapper to every syscall listed in the signal(7) manpage as being > interruptible. > > Most of the patches are just straightforward "use the wrapper" changes. > For a few things get a little more complicated because we need to use > the direct syscall rather than the helpful libc wrapper: > * for the IPC syscalls we need to handle the host kernel maybe > doing these via individual syscalls and maybe via the single > 'ipc' syscall > * poll has to be implemented via the ppoll syscall now, which means > converting the timeout argument > * in order to have all the fcntl-related syscalls go via fcntl64 > (rather than using a wrapper for both fcntl and fcntl64 on 32-bit > hosts), there are patches which clean up the conversion of the > target_flock data structures. These in passing fix buggy conversion > code which was making us fail some LTP tests > > The last two patches are trivial ones which neaten up the QEMU > strace output for the cases where the returned errnos printed by > the strace layer are QEMU-internal ones rather than real guest errnos. > > This patchset sits on top of: > * the 'fix various signal race conditions' patchset currently on list: > https://lists.nongnu.org/archive/html/qemu-devel/2016-05/msg05057.html > * the fadvise patches (on list, reviewed) > * the 'provide frame information in x86-64 safe_syscall' patch v2 > (on list, reviewed) > > https://git.linaro.org/people/peter.maydell/qemu-arm.git sigrace-fixes-3 > is a git branch with those prequisites plus this patchset.
I've merged most of this now to to: https://git.linaro.org/people/riku.voipio/qemu.git/shortlog/refs/heads/linux-user-for-upstream With the changes of Adding Laurent's reviewed by's where given and And adjusted changed to "abi_llong" in "Correct signedness of target_flock l_start and l_len fields" as suggested. Dropped: - linux-user: Use __get_user() and __put_user() to handle... Due to comments linux-user: Use safe_syscall wrapper for fcntl Because it needs the above one linux-user: Avoid possible misalignment in host_to_target_siginfo() Since it break's compile I think I'd prefer to send this set as-is (after some more testing) and get fcntl and siginfo fixed for next batch. This set is already quite big and I guess people are eager to test this fixes too. Riku > thanks > -- PMM > > Peter Maydell (18): > linux-user: Use safe_syscall wrapper for readv and writev syscalls > linux-user: Use safe_syscall wrapper for connect syscall > linux-user: Use safe_syscall wrapper for send* and recv* syscalls > linux-user: Use safe_syscall wrapper for msgsnd and msgrcv > linux-user: Use safe_syscall wrapper for mq_timedsend and > mq_timedreceive > linux-user: Use safe_syscall wrapper for flock > linux-user: Use safe_syscall wrapper for rt_sigtimedwait syscall > linux-user: Use safe_syscall wrapper for sleep syscalls > linux-user: Use safe_syscall wrapper for poll and ppoll syscalls > linux-user: Use safe_syscall wrapper for epoll_wait syscalls > linux-user: Use safe_syscall wrapper for semop > linux-user: Use safe_syscall wrapper for accept and accept4 syscalls > linux-user: Use safe_syscall wrapper for ioctl > linux-user: Use __get_user() and __put_user() to handle structs in > do_fcntl() > linux-user: Correct signedness of target_flock l_start and l_len > fields > linux-user: Use safe_syscall wrapper for fcntl > linux-user: Make target_strerror() return 'const char *' > linux-user: Special-case ERESTARTSYS in target_strerror() > > configure | 21 +- > linux-user/qemu.h | 2 +- > linux-user/strace.c | 4 +- > linux-user/syscall.c | 547 > ++++++++++++++++++++++++++++------------------ > linux-user/syscall_defs.h | 34 +-- > 5 files changed, 359 insertions(+), 249 deletions(-) > > -- > 1.9.1 >