1. 17 6月, 2015 32 次提交
  2. 16 6月, 2015 8 次提交
    • S
      virtfs-proxy-helper: fail gracefully if socket path is too long · f8d30a4f
      Stefan Hajnoczi 提交于
      Replace the assertion check with graceful failure when the socket path
      is too long.  Programs should not crash on invalid input.  Print an
      error message and exit properly.
      
      Cc: Shannon Zhao <zhaoshenglong@huawei.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      f8d30a4f
    • S
      virtfs-proxy-helper: add missing long option terminator · bf6667d6
      Stefan Hajnoczi 提交于
      The getopt_long(3) long options array must have a zeroed terminator.
      
      This patch solves a segmentation fault when an unknown command-line
      option is encountered:
      
        $ fsdev/virtfs-proxy-helper --help
        Segmentation fault (core dumped)
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      bf6667d6
    • P
      Merge remote-tracking branch 'remotes/kraxel/tags/pull-vga-20150615-1' into staging · 93f6d1c1
      Peter Maydell 提交于
      virtio-gpu: pci support bits and virtio-vga.
      
      # gpg: Signature made Mon Jun 15 13:55:19 2015 BST using RSA key ID D3E87138
      # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
      # gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
      # gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
      
      * remotes/kraxel/tags/pull-vga-20150615-1:
        virtio-vga: add vgabios configuration
        virtio-vga: add '-vga virtio' support
        virtio-vga: add virtio gpu device with vga compatibility
        virtio-gpu-pci: add virtio pci support
        virtio-gpu: fix error message
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      93f6d1c1
    • P
      Merge remote-tracking branch 'remotes/riku/tags/pull-linux-user-20150616' into staging · 4316536b
      Peter Maydell 提交于
      linux-user patches for 2.4 softfreeze
      second spin with ioctl patch refreshed
      
      # gpg: Signature made Tue Jun 16 08:03:14 2015 BST using RSA key ID DE3C9BC0
      # gpg: Good signature from "Riku Voipio <riku.voipio@iki.fi>"
      # gpg:                 aka "Riku Voipio <riku.voipio@linaro.org>"
      
      * remotes/riku/tags/pull-linux-user-20150616:
        linux-user: ioctl() command type is int
        linux-user: fix the breakpoint inheritance in spawned threads
        linux-user: use __get_user and __put_user in cmsg conversions
        linux-user: Fix length handling in host_to_target_cmsg
        linux-user: Use abi_ulong for TARGET_ELF_PAGESTART
        linux-user: Allocate thunk size dynamically
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      4316536b
    • L
      linux-user: ioctl() command type is int · 45c874eb
      Laurent Vivier 提交于
      When executing a 64bit target chroot on 64bit host,
      the ioctl() command can mismatch.
      
      It seems the previous commit doesn't solve the problem in
      my case:
      
          9c6bf9c7 linux-user: Fix ioctl cmd type mismatch on 64-bit targets
      
      For example, a ppc64 chroot on an x86_64 host:
      
      bash-4.3# ls
      Unsupported ioctl: cmd=0x80087467
      Unsupported ioctl: cmd=0x802c7415
      
      The origin of the problem is in syscall.c:do_ioctl().
      
          static abi_long do_ioctl(int fd, abi_long cmd, abi_long arg)
      
      In this case (ppc64) abi_long is long (on the x86_64), and
      
          cmd = 0x0000000080087467
      
      then
          if (ie->target_cmd == cmd)
      
      target_cmd is int, so target_cmd = 0x80087467
      and to compare an int with a long, the sign is extended to 64bit,
      so the comparison is:
      
          if (0xffffffff80087467 == 0x0000000080087467)
      
      which doesn't match whereas it should.
      
      This patch uses int in the case of the target command type
      instead of abi_long.
      Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
      Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
      45c874eb
    • T
      linux-user: fix the breakpoint inheritance in spawned threads · 1d085f6c
      Thierry Bultel 提交于
      When a thread is spawned, cpu_copy re-initializes
      the bp & wp lists of current thread, instead of the ones
      of the new thread.
      The effect is that breakpoints are no longer hit.
      Signed-off-by: NThierry Bultel <thierry.bultel@basystemes.fr>
      Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
      1d085f6c
    • P
      linux-user: use __get_user and __put_user in cmsg conversions · 876e23cb
      Peter Maydell 提交于
      The target payloads in cmsg conversions may not have the alignment
      required by the host. Using the get_user and put_user functions is
      the easiest way to handle this and also do the byte-swapping we
      require.
      
      (Note that prior to this commit target_to_host_cmsg was incorrectly
      using __put_user() rather than __get_user() for the SCM_CREDENTIALS
      conversion, which meant it wasn't getting the benefit of the
      misalignment handling.)
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
      876e23cb
    • P
      linux-user: Fix length handling in host_to_target_cmsg · c2aeb258
      Peter Maydell 提交于
      The previous code for handling payload length when converting
      cmsg structures from host to target had a number of problems:
       * we required the msg->msg_controllen to declare the buffer
         to have enough space for final trailing padding (we were
         checking against CMSG_SPACE), whereas the kernel does not
         require this, and common userspace code assumes this. (In
         particular, glibc's "try to talk to nscd" code that it will
         run on startup will receive a cmsg with a 4 byte payload and
         only allocate 4 bytes for it, which was causing us to do
         the wrong thing on architectures that need 8-alignment.)
       * we weren't correctly handling the fact that the SO_TIMESTAMP
         payload may be larger for the target than the host
       * we weren't marking the messages with MSG_CTRUNC when we did
         need to truncate a message that wasn't truncated by the host,
         but were instead logging a QEMU message; since truncation is
         always the result of a guest giving us an insufficiently
         sized buffer, we should report it to the guest as the kernel
         does and don't log anything
      
      Rewrite the parts of the function that deal with length to
      fix these issues, and add a comment in target_to_host_cmsg
      to explain why the overflow logging it does is a QEMU bug,
      not a guest issue.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
      c2aeb258