qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Riku Voipio <riku.voipio@iki.fi>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, patches@linaro.org,
	Laurent Vivier <laurent@vivier.eu>
Subject: Re: [Qemu-devel] [PATCH 00/18] linux-user: Extend safe_syscall wrapper use
Date: Wed, 8 Jun 2016 12:20:44 +0300	[thread overview]
Message-ID: <20160608092044.GA27182@beaming.home> (raw)
In-Reply-To: <1465239499-5048-1-git-send-email-peter.maydell@linaro.org>

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
> 

  parent reply	other threads:[~2016-06-08  9:20 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-06 18:58 [Qemu-devel] [PATCH 00/18] linux-user: Extend safe_syscall wrapper use Peter Maydell
2016-06-06 18:58 ` [Qemu-devel] [PATCH 01/18] linux-user: Use safe_syscall wrapper for readv and writev syscalls Peter Maydell
2016-06-06 18:58 ` [Qemu-devel] [PATCH 02/18] linux-user: Use safe_syscall wrapper for connect syscall Peter Maydell
2016-06-06 18:58 ` [Qemu-devel] [PATCH 03/18] linux-user: Use safe_syscall wrapper for send* and recv* syscalls Peter Maydell
2016-06-06 18:58 ` [Qemu-devel] [PATCH 04/18] linux-user: Use safe_syscall wrapper for msgsnd and msgrcv Peter Maydell
2016-06-06 18:58 ` [Qemu-devel] [PATCH 05/18] linux-user: Use safe_syscall wrapper for mq_timedsend and mq_timedreceive Peter Maydell
2016-06-06 18:58 ` [Qemu-devel] [PATCH 06/18] linux-user: Use safe_syscall wrapper for flock Peter Maydell
2016-06-06 18:58 ` [Qemu-devel] [PATCH 07/18] linux-user: Use safe_syscall wrapper for rt_sigtimedwait syscall Peter Maydell
2016-06-06 18:58 ` [Qemu-devel] [PATCH 08/18] linux-user: Use safe_syscall wrapper for sleep syscalls Peter Maydell
2016-06-06 18:58 ` [Qemu-devel] [PATCH 09/18] linux-user: Use safe_syscall wrapper for poll and ppoll syscalls Peter Maydell
2016-06-06 18:58 ` [Qemu-devel] [PATCH 10/18] linux-user: Use safe_syscall wrapper for epoll_wait syscalls Peter Maydell
2016-06-06 18:58 ` [Qemu-devel] [PATCH 11/18] linux-user: Use safe_syscall wrapper for semop Peter Maydell
2016-06-06 18:58 ` [Qemu-devel] [PATCH 12/18] linux-user: Use safe_syscall wrapper for accept and accept4 syscalls Peter Maydell
2016-06-06 18:58 ` [Qemu-devel] [PATCH 13/18] linux-user: Use safe_syscall wrapper for ioctl Peter Maydell
2016-06-06 18:58 ` [Qemu-devel] [PATCH 14/18] linux-user: Use __get_user() and __put_user() to handle structs in do_fcntl() Peter Maydell
2016-06-07 20:41   ` Laurent Vivier
2016-06-07 21:20     ` Peter Maydell
2016-06-08  9:33       ` Laurent Vivier
2016-06-06 18:58 ` [Qemu-devel] [PATCH 15/18] linux-user: Correct signedness of target_flock l_start and l_len fields Peter Maydell
2016-06-07 20:00   ` Laurent Vivier
2016-06-06 18:58 ` [Qemu-devel] [PATCH 16/18] linux-user: Use safe_syscall wrapper for fcntl Peter Maydell
2016-06-06 18:58 ` [Qemu-devel] [PATCH 17/18] linux-user: Make target_strerror() return 'const char *' Peter Maydell
2016-06-07 19:56   ` Laurent Vivier
2016-06-06 18:58 ` [Qemu-devel] [PATCH 18/18] linux-user: Special-case ERESTARTSYS in target_strerror() Peter Maydell
2016-06-07 19:53   ` Laurent Vivier
2016-06-07 21:31     ` Peter Maydell
2016-06-08  9:20 ` Riku Voipio [this message]
2016-06-08 11:26   ` [Qemu-devel] [PATCH 00/18] linux-user: Extend safe_syscall wrapper use Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160608092044.GA27182@beaming.home \
    --to=riku.voipio@iki.fi \
    --cc=laurent@vivier.eu \
    --cc=patches@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).