1. 30 6月, 2017 6 次提交
  2. 29 6月, 2017 13 次提交
    • P
      Merge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into staging · 454d7dc9
      Peter Maydell 提交于
      - fixes a minor bug that could possibly prevent old guests to remove
        directories
      - makes default permissions for new files configurable from the cmdline
        when using mapped security modes
      - handle transport errors
      - g_malloc()+memcpy() converted to g_memdup()
      
      # gpg: Signature made Thu 29 Jun 2017 14:12:42 BST
      # gpg:                using DSA key 0x02FC3AEB0101DBC2
      # gpg: Good signature from "Greg Kurz <groug@kaod.org>"
      # gpg:                 aka "Greg Kurz <groug@free.fr>"
      # gpg:                 aka "Greg Kurz <gkurz@linux.vnet.ibm.com>"
      # gpg:                 aka "Gregory Kurz (Groug) <groug@free.fr>"
      # gpg:                 aka "[jpeg image of size 3330]"
      # gpg: WARNING: This key is not certified with a trusted signature!
      # gpg:          There is no indication that the signature belongs to the owner.
      # Primary key fingerprint: 2BD4 3B44 535E C0A7 9894  DBA2 02FC 3AEB 0101 DBC2
      
      * remotes/gkurz/tags/for-upstream:
        9pfs: handle transport errors in pdu_complete()
        xen-9pfs: disconnect if buffers are misconfigured
        virtio-9p: break device if buffers are misconfigured
        virtio-9p: message header is 7-byte long
        virtio-9p: record element after sanity checks
        9pfs: replace g_malloc()+memcpy() with g_memdup()
        9pfs: local: Add support for custom fmode/dmode in 9ps mapped security modes
        9pfs: local: remove: use correct path component
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      454d7dc9
    • J
      ui/cocoa.m: Fix compatibility issue with Mac OS 10.9 and under · e7206249
      John Arbuckle 提交于
      The [NSEvent modifierFlags] method returns an NSEventModifierFlags type value in Mac OS 10.10. It use to be of type NSUInteger. Replacing NSEventModifierFlags with NSUInteger allows for the cooca.m file to be compiled on older versions of Mac OS. This patch was been tested on Mac OS 10.6 and Mac OS 10.12 without problem.
      Signed-off-by: NJohn Arbuckle <programmingkidx@gmail.com>
      Message-id: F6C36C1A-4661-48F4-BEA6-3994889927D0@gmail.com
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      e7206249
    • G
      9pfs: handle transport errors in pdu_complete() · 06a37db7
      Greg Kurz 提交于
      Contrary to what is written in the comment, a buggy guest can misconfigure
      the transport buffers and pdu_marshal() may return an error.  If this ever
      happens, it is up to the transport layer to handle the situation (9P is
      transport agnostic).
      
      This fixes Coverity issue CID1348518.
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      Reviewed-by: NStefano Stabellini <sstabellini@kernel.org>
      06a37db7
    • S
      xen-9pfs: disconnect if buffers are misconfigured · e08d1e11
      Stefano Stabellini 提交于
      Implement xen_9pfs_disconnect by unbinding the event channels. On
      xen_9pfs_free, call disconnect if any event channels haven't been
      disconnected.
      
      If the frontend misconfigured the buffers set the backend to "Closing"
      and disconnect it. Misconfigurations include requesting a read of more
      bytes than available on the ring buffer, or claiming to be writing more
      data than available on the ring buffer.
      Signed-off-by: NStefano Stabellini <stefano@aporeto.com>
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      e08d1e11
    • G
      virtio-9p: break device if buffers are misconfigured · 8d37de41
      Greg Kurz 提交于
      The 9P protocol is transport agnostic: if the guest misconfigured the
      buffers, the best we can do is to set the broken flag on the device.
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      8d37de41
    • G
      virtio-9p: message header is 7-byte long · a4d99854
      Greg Kurz 提交于
      The 9p spec at http://man.cat-v.org/plan_9/5/intro reads:
      
       "Each 9P message begins with a four-byte size field specify-
        ing the length in bytes of the complete message including
        the four bytes of the size field itself.  The next byte is
        the message type, one of the constants in the enumeration in
        the include file <fcall.h>.  The next two bytes are an iden-
        tifying tag, described below."
      
      ie, each message starts with a 7-byte long header.
      
      The core 9P code already assumes this pretty much everywhere. This patch
      does the following:
      - makes the assumption explicit in the common 9p.h header, since it isn't
        related to the transport
      - open codes the header size in handle_9p_output() and hardens the sanity
        check on the space needed for the reply message
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      Acked-by: NStefano Stabellini <sstabellini@kernel.org>
      a4d99854
    • G
      virtio-9p: record element after sanity checks · 3a21fb2a
      Greg Kurz 提交于
      If the guest sends a malformed request, we end up with a dangling pointer
      in V9fsVirtioState. This doesn't seem to cause any bug, but let's remove
      this side effect anyway.
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      3a21fb2a
    • M
      9pfs: replace g_malloc()+memcpy() with g_memdup() · 453a1b23
      Marc-André Lureau 提交于
      I found these pattern via grepping the source tree. I don't have a
      coccinelle script for it!
      Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      453a1b23
    • T
      9pfs: local: Add support for custom fmode/dmode in 9ps mapped security modes · b96feb2c
      Tobias Schramm 提交于
      In mapped security modes, files are created with very restrictive
      permissions (600 for files and 700 for directories). This makes
      file sharing between virtual machines and users on the host rather
      complicated. Imagine eg. a group of users that need to access data
      produced by processes on a virtual machine. Giving those users access
      to the data will be difficult since the group access mode is always 0.
      
      This patch makes the default mode for both files and directories
      configurable. Existing setups that don't know about the new parameters
      keep using the current secure behavior.
      Signed-off-by: NTobias Schramm <tobleminer@gmail.com>
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      b96feb2c
    • B
      9pfs: local: remove: use correct path component · 790db7ef
      Bruce Rogers 提交于
      Commit a0e640a8 introduced a path processing error.
      Pass fstatat the dirpath based path component instead
      of the entire path.
      Signed-off-by: NBruce Rogers <brogers@suse.com>
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      790db7ef
    • P
      Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20170628' into staging · 4fe60423
      Peter Maydell 提交于
      migration/next for 20170628
      
      # gpg: Signature made Wed 28 Jun 2017 12:16:44 BST
      # gpg:                using RSA key 0xF487EF185872D723
      # gpg: Good signature from "Juan Quintela <quintela@redhat.com>"
      # gpg:                 aka "Juan Quintela <quintela@trasno.org>"
      # gpg: WARNING: This key is not certified with a trusted signature!
      # gpg:          There is no indication that the signature belongs to the owner.
      # Primary key fingerprint: 1899 FF8E DEBF 58CC EE03  4B82 F487 EF18 5872 D723
      
      * remotes/juanquintela/tags/migration/20170628:
        exec: fix access to ram_list.dirty_memory when sync dirty bitmap
        migration: add "return-path" capability
        vmstate: error hint for failed equal checks
        migration: add comment for TYPE_MIGRATE
        migration: hmp: dump globals
        migration: merge enforce_config_section somewhat
        migration: move skip_section_footers
        migration: move skip_configuration out
        migration: move only_migratable to MigrationState
        migration: move global_state.optional out
        migration: let MigrationState be a qdev
        vl: clean up global property registration
        accel: introduce AccelClass.global_props
        machine: export register_compat_prop()
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      4fe60423
    • P
      Merge remote-tracking branch 'remotes/sstabellini/tags/xen-20170627-tag' into staging · 46458867
      Peter Maydell 提交于
      Xen 2017/06/27
      
      # gpg: Signature made Tue 27 Jun 2017 23:02:43 BST
      # gpg:                using RSA key 0x894F8F4870E1AE90
      # gpg: Good signature from "Stefano Stabellini <stefano.stabellini@eu.citrix.com>"
      # gpg:                 aka "Stefano Stabellini <sstabellini@kernel.org>"
      # Primary key fingerprint: D04E 33AB A51F 67BA 07D3  0AEA 894F 8F48 70E1 AE90
      
      * remotes/sstabellini/tags/xen-20170627-tag:
        xen-disk: add support for multi-page shared rings
        xen-disk: only advertize feature-persistent if grant copy is not available
        xen/disk: don't leak stack data via response ring
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      46458867
    • P
      linux-user: Put PPC AT_IGNOREPPC auxv entries in the right place · 82991bed
      Peter Maydell 提交于
      The 32-bit PPC auxv is a bit complicated because in the
      mists of time it used to be 16-aligned rather than directly
      after the environment. Older glibc versions had code to
      try to probe for whether it needed alignment or not:
      https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c;hb=e84eabb3871c9b39e59323bf3f6b98c2ca9d1cd0
      and the kernel has code which puts some magic entries at
      the bottom to ensure that the alignment probe fails:
      http://elixir.free-electrons.com/linux/latest/source/arch/powerpc/include/asm/elf.h#L158
      
      QEMU has similar code too, but it was broken by commit
      7c4ee5bc, which changed elfload.c from filling in
      the auxv starting at the highest address and working down
      to starting at the lowest address and working up. This
      means that the ARCH_DLINFO hook must now be invoked first
      rather than last, and the entries in it for PPC must
      be reversed so that the magic AT_IGNOREPPC entries come
      at the lowest address in the auxv as they should.
      
      The effect of this was that if running a guest binary that
      used an old glibc with the alignment probing the guest ld.so
      code would segfault if the size of the guest environment and
      argv happened to put the auxv at an address that triggered
      the alignment code in the guest glibc.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Tested-by: NRichard Henderson <rth@twiddle.net>
      Message-id: 1498582198-6649-1-git-send-email-peter.maydell@linaro.org
      82991bed
  3. 28 6月, 2017 17 次提交
  4. 27 6月, 2017 4 次提交