1. 16 5月, 2017 3 次提交
    • S
      Merge remote-tracking branch 'gkurz/tags/security-fix-for-2.10' into staging · 96cd5998
      Stefan Hajnoczi 提交于
      Fix for CVE-2017-7493.
      
      # gpg: Signature made Mon 15 May 2017 07:48:20 PM 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@fr.ibm.com>"
      # gpg:                 aka "Greg Kurz <gkurz@linux.vnet.ibm.com>"
      # gpg:                 aka "Gregory Kurz (Groug) <groug@free.fr>"
      # gpg:                 aka "Gregory Kurz (Cimai Technology) <gkurz@cimai.com>"
      # gpg:                 aka "Gregory Kurz (Meiosys Technology) <gkurz@meiosys.com>"
      # 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
      
      * gkurz/tags/security-fix-for-2.10:
        9pfs: local: forbid client access to metadata (CVE-2017-7493)
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      96cd5998
    • S
      Merge remote-tracking branch 'aurel32/tags/pull-target-sh4-20170513' into staging · 6a8d8349
      Stefan Hajnoczi 提交于
      Queued target/sh4 patches
      
      # gpg: Signature made Sat 13 May 2017 10:25:41 AM BST
      # gpg:                using RSA key 0xBA9C78061DDD8C9B
      # gpg: Good signature from "Aurelien Jarno <aurelien@aurel32.net>"
      # gpg:                 aka "Aurelien Jarno <aurelien@jarno.fr>"
      # gpg:                 aka "Aurelien Jarno <aurel32@debian.org>"
      # Primary key fingerprint: 7746 2642 A9EF 94FD 0F77  196D BA9C 7806 1DDD 8C9B
      
      * aurel32/tags/pull-target-sh4-20170513:
        target/sh4: use cpu_loop_exit_restore
        target/sh4: trap unaligned accesses
        target/sh4: movua.l is an SH4-A only instruction
        target/sh4: implement tas.b using atomic helper
        target/sh4: generate fences for SH4
        target/sh4: optimize gen_write_sr using extract op
        target/sh4: optimize gen_store_fpr64
        target/sh4: fold ctx->bstate = BS_BRANCH into gen_conditional_jump
        target/sh4: only save flags state at the end of the TB
        target/sh4: fix BS_EXCP exit
        target/sh4: fix BS_STOP exit
        target/sh4: move DELAY_SLOT_TRUE flag into a separate global
        target/sh4: do not include DELAY_SLOT_TRUE in the TB state
        target/sh4: get rid of DELAY_SLOT_CLEARME
        target/sh4: split ctx->flags into ctx->tbflags and ctx->envflags
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      6a8d8349
    • S
      Merge remote-tracking branch 'rth/tags/pull-s390-20170512' into staging · eba01619
      Stefan Hajnoczi 提交于
      Queued target/s390 patches
      
      # gpg: Signature made Sat 13 May 2017 12:33:08 AM BST
      # gpg:                using RSA key 0xAD1270CC4DD0279B
      # gpg: Good signature from "Richard Henderson <rth7680@gmail.com>"
      # gpg:                 aka "Richard Henderson <rth@redhat.com>"
      # gpg:                 aka "Richard Henderson <rth@twiddle.net>"
      # Primary key fingerprint: 9CB1 8DDA F8E8 49AD 2AFC  16A4 AD12 70CC 4DD0 279B
      
      * rth/tags/pull-s390-20170512:
        target/s390x: implement serialization in BRANCH CONDITION
        target/s390x: fix SIGNAL PROCESSOR return value
        target/s390x: mask the SIGP order_code using SIGP_ORDER_MASK
        target/s390x: Use atomic operations for LOAD AND OP
        target/s390x: Use atomic operations for COMPARE SWAP
        target/s390x: Implement LOAD PAIR DISJOINT
        target/s390x: Diagnose specification exception for atomics
        target/s390x: Implement LOAD PROGRAM PARAMETER
        target/s390x: Implement STORE FACILITIES LIST EXTENDED
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      eba01619
  2. 15 5月, 2017 6 次提交
    • S
      Merge remote-tracking branch 'kraxel/tags/pull-usb-20170512-1' into staging · 8a813c98
      Stefan Hajnoczi 提交于
      usb: bugfixes, doc update
      
      # gpg: Signature made Fri 12 May 2017 01:20:29 PM BST
      # gpg:                using RSA key 0x4CB6D8EED3E87138
      # 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>"
      # Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138
      
      * kraxel/tags/pull-usb-20170512-1:
        hw/usb/dev-serial: Do not try to set vendorid or productid properties
        xhci: relax link check
        usb-hub: clear PORT_STAT_SUSPEND on wakeup
        xhci: fix logging
        usb-redir: fix stack overflow in usbredir_log_data
        qemu-doc: Update to use the new way of attaching USB devices
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      8a813c98
    • S
      Merge remote-tracking branch 'kraxel/tags/pull-ui-20170512-1' into staging · 384d9d55
      Stefan Hajnoczi 提交于
      ui: add egl-headless
      ui: some vnc cleanups
      ui: absolute events for input-linux
      
      # gpg: Signature made Fri 12 May 2017 12:50:07 PM BST
      # gpg:                using RSA key 0x4CB6D8EED3E87138
      # 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>"
      # Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138
      
      * kraxel/tags/pull-ui-20170512-1:
        vnc: replace hweight_long() with ctpopl()
        vnc: simple clean up
        opengl: add egl-headless display
        egl: explicitly ask for core context
        egl-helpers: add missing error check
        egl-helpers: fix display init for x11
        egl-helpers: drop support for gles and debug logging
        virtio-gpu: move virtio_gpu_gl_block
        ui: input-linux: Add absolute event support
        ui: Support non-zero minimum values for absolute input axes
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      384d9d55
    • G
      9pfs: local: forbid client access to metadata (CVE-2017-7493) · 7a95434e
      Greg Kurz 提交于
      When using the mapped-file security mode, we shouldn't let the client mess
      with the metadata. The current code already tries to hide the metadata dir
      from the client by skipping it in local_readdir(). But the client can still
      access or modify it through several other operations. This can be used to
      escalate privileges in the guest.
      
      Affected backend operations are:
      - local_mknod()
      - local_mkdir()
      - local_open2()
      - local_symlink()
      - local_link()
      - local_unlinkat()
      - local_renameat()
      - local_rename()
      - local_name_to_path()
      
      Other operations are safe because they are only passed a fid path, which
      is computed internally in local_name_to_path().
      
      This patch converts all the functions listed above to fail and return
      EINVAL when being passed the name of the metadata dir. This may look
      like a poor choice for errno, but there's no such thing as an illegal
      path name on Linux and I could not think of anything better.
      
      This fixes CVE-2017-7493.
      Reported-by: NLeo Gaspard <leo@gaspard.io>
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      7a95434e
    • S
      Merge remote-tracking branch 'ehabkost/tags/x86-and-machine-pull-request' into staging · ba9915e1
      Stefan Hajnoczi 提交于
      x86 and machine queue, 2017-05-11
      
      Highlights:
      * New "-numa cpu" option
      * NUMA distance configuration
      * migration/i386 vmstatification
      
      # gpg: Signature made Thu 11 May 2017 08:16:07 PM BST
      # gpg:                using RSA key 0x2807936F984DC5A6
      # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>"
      # gpg: Note: This key has expired!
      # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF  D1AA 2807 936F 984D C5A6
      
      * ehabkost/tags/x86-and-machine-pull-request: (29 commits)
        migration/i386: Remove support for pre-0.12 formats
        vmstatification: i386 FPReg
        migration/i386: Remove old non-softfloat 64bit FP support
        tests: check -numa node,cpu=props_list usecase
        numa: add '-numa cpu,...' option for property based node mapping
        numa: remove node_cpu bitmaps as they are no longer used
        numa: use possible_cpus for not mapped CPUs check
        machine: call machine init from wrapper
        numa: remove no longer need numa_post_machine_init()
        tests: numa: add case for QMP command query-cpus
        QMP: include CpuInstanceProperties into query_cpus output output
        virt-arm: get numa node mapping from possible_cpus instead of numa_get_node_for_cpu()
        spapr: get numa node mapping from possible_cpus instead of numa_get_node_for_cpu()
        pc: get numa node mapping from possible_cpus instead of numa_get_node_for_cpu()
        numa: do default mapping based on possible_cpus instead of node_cpu bitmaps
        numa: mirror cpu to node mapping in MachineState::possible_cpus
        numa: add check that board supports cpu_index to node mapping
        virt-arm: add node-id property to CPU
        pc: add node-id property to CPU
        spapr: add node-id property to sPAPR core
        ...
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      ba9915e1
    • S
      Merge remote-tracking branch 'kraxel/tags/pull-vga-20170511-1' into staging · 43ad494c
      Stefan Hajnoczi 提交于
      make display updates thread safe, batch #2
      
      # gpg: Signature made Thu 11 May 2017 03:41:51 PM BST
      # gpg:                using RSA key 0x4CB6D8EED3E87138
      # 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>"
      # Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138
      
      * kraxel/tags/pull-vga-20170511-1:
        vga: fix display update region calculation
        sm501: make display updates thread safe
        tcx: make display updates thread safe
        cg3: make display updates thread safe
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      43ad494c
    • S
      Merge remote-tracking branch 'dgibson/tags/ppc-for-2.10-20170511' into staging · 2f77ec73
      Stefan Hajnoczi 提交于
      ppc patch queue for 2017-05-11
      
      This pull request supersedes the one from yesterday (20170510), fixing
      an important style bug in one patch, and adding an extra couple of
      simple patches.
      
      Highlights of this set:
        * Some fixes for POWER9
        * TCG support for POWER9 radix MMU
        * VGA rom for Mac machine types
        * Fixes for the XICS interrupt controller
        * MTTCG support for ppc targets
      
      As suggested by Paolo, I've tried to add the Docker tests to my
      standard pre-pull-request tests.  I haven't wholly suceeded; this has
      been tested with some of the Docker images, but others I haven't
      managed due to problems that as best I can tell are not due to
      problems in this patch series.  I'll continue working on this for
      future pull requests.  Specifically, 'travis', 'fedora', and 'centos6'
      seem to work.  'min-glib' jammed while gtesting moxie, which seems
      very unlikely to be caused by this series.  'ubuntu', 'debian' and
      'debian-bootstrap' hit build errors almost immediately that look like
      problems with the container configuration, and 'debian-*-cross' hit
      build errors later on which also look like missing dependencies from
      the container.
      
      # gpg: Signature made Thu 11 May 2017 05:13:46 AM BST
      # gpg:                using RSA key 0x6C38CACA20D9B392
      # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>"
      # gpg:                 aka "David Gibson (kernel.org) <dwg@kernel.org>"
      # gpg:                 aka "David Gibson (Red Hat) <dgibson@redhat.com>"
      # gpg:                 aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>"
      # Primary key fingerprint: 75F4 6586 AE61 A66C C44E  87DC 6C38 CACA 20D9 B392
      
      * dgibson/tags/ppc-for-2.10-20170511: (23 commits)
        target/ppc: Avoid printing wrong aliases in CPU help text
        pnv: Fix build failures on some host platforms
        target/ppc: Allow workarounds for POWER9 DD1
        spapr: Don't accidentally advertise HTM support on POWER9
        ppc: xics: fix compilation with CentOS 6
        target/ppc: Enable RADIX mmu mode for pseries TCG guest
        target/ppc: Implement ISA V3.00 radix page fault handler
        target/ppc: Change tlbie invalid fields for POWER9 support
        target/ppc: Update tlbie to check privilege level based on GTSE
        target/ppc: Set UPRT and GTSE on all cpus in H_REGISTER_PROCESS_TABLE
        ppc: add qemu_vga.ndrv ROM to fw_cfg interface for NewWorld Macs
        ppc: add qemu_vga.ndrv ROM to fw_cfg interface for OldWorld Macs
        Add QemuMacDrivers qemu_vga.ndrv revision d4e7d7a built as submodule
        Add QemuMacDrivers as submodule
        ppc/xics: preserve P and Q bits for KVM IRQs
        ppc/xics: Fix stale irq->status bits after get
        target/ppc: do not reset reserve_addr in exec_enter
        tcg: enable MTTCG by default for PPC64 on x86
        cpus: Fix CPU unplug for MTTCG
        target/ppc: Generate fence operations
        ...
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      2f77ec73
  3. 13 5月, 2017 24 次提交
  4. 12 5月, 2017 7 次提交
    • S
      Merge tag 'tracing-pull-request' into staging · 3a876066
      Stefan Hajnoczi 提交于
      # gpg: Signature made Fri 12 May 2017 10:38:07 AM EDT
      # gpg:                using RSA key 0x9CA4ABB381AB73C8
      # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
      # gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"
      # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8
      
      * tag 'tracing-pull-request':
        trace: add sanity check
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      3a876066
    • S
      Merge tag 'block-pull-request' into staging · b54933ee
      Stefan Hajnoczi 提交于
      # gpg: Signature made Fri 12 May 2017 10:37:12 AM EDT
      # gpg:                using RSA key 0x9CA4ABB381AB73C8
      # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
      # gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"
      # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8
      
      * tag 'block-pull-request':
        aio: add missing aio_notify() to aio_enable_external()
        block: Simplify BDRV_BLOCK_RAW recursion
        coroutine: remove GThread implementation
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      b54933ee
    • S
      Merge remote-tracking branch 'kwolf/tags/for-upstream' into staging · 3753e255
      Stefan Hajnoczi 提交于
      Block layer patches
      
      # gpg: Signature made Thu 11 May 2017 10:31:37 AM EDT
      # gpg:                using RSA key 0x7F09B272C88F2FD6
      # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>"
      # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74  56FE 7F09 B272 C88F 2FD6
      
      * kwolf/tags/for-upstream: (58 commits)
        MAINTAINERS: Add qemu-progress to the block layer
        qcow2: Discard/zero clusters by byte count
        qcow2: Assert that cluster operations are aligned
        qcow2: Optimize write zero of unaligned tail cluster
        iotests: Add test 179 to cover write zeroes with unmap
        iotests: Improve _filter_qemu_img_map
        qcow2: Optimize zero_single_l2() to minimize L2 churn
        qcow2: Make distinction between zero cluster types obvious
        qcow2: Name typedef for cluster type
        qcow2: Correctly report status of preallocated zero clusters
        block: Update comments on BDRV_BLOCK_* meanings
        qcow2: Use consistent switch indentation
        qcow2: Nicer variable names in qcow2_update_snapshot_refcount()
        tests: Add coverage for recent block geometry fixes
        blkdebug: Add ability to override unmap geometries
        blkdebug: Simplify override logic
        blkdebug: Add pass-through write_zero and discard support
        blkdebug: Refactor error injection
        blkdebug: Sanity check block layer guarantees
        qemu-io: Switch 'map' output to byte-based reporting
        ...
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      3753e255
    • A
      trace: add sanity check · 5651743c
      Anthony Xu 提交于
      If trace backend is set to TRACE_NOP, trace_get_vcpu_event_count
      returns 0, cause bitmap_new call abort.
      
      The abort can be triggered as follows:
      
        $ ./configure --enable-trace-backend=nop --target-list=x86_64-softmmu
        $ gdb ./x86_64-softmmu/qemu-system-x86_64 -M q35,accel=kvm -m 1G
        (gdb) bt
        #0  0x00007ffff04e25f7 in raise () from /lib64/libc.so.6
        #1  0x00007ffff04e3ce8 in abort () from /lib64/libc.so.6
        #2  0x00005555559de905 in bitmap_new (nbits=<optimized out>)
            at /home/root/git/qemu2.git/include/qemu/bitmap.h:96
        #3  cpu_common_initfn (obj=0x555556621d30) at qom/cpu.c:399
        #4  0x0000555555a11869 in object_init_with_type (obj=0x555556621d30, ti=0x55555656bbb0) at qom/object.c:341
        #5  0x0000555555a11869 in object_init_with_type (obj=0x555556621d30, ti=0x55555656bd30) at qom/object.c:341
        #6  0x0000555555a11efc in object_initialize_with_type (data=data@entry=0x555556621d30, size=76560,
            type=type@entry=0x55555656bd30) at qom/object.c:376
        #7  0x0000555555a12061 in object_new_with_type (type=0x55555656bd30) at qom/object.c:484
        #8  0x0000555555a121c5 in object_new (typename=typename@entry=0x555556550340 "qemu64-x86_64-cpu")
            at qom/object.c:494
        #9  0x00005555557f6e3d in pc_new_cpu (typename=typename@entry=0x555556550340 "qemu64-x86_64-cpu", apic_id=0,
            errp=errp@entry=0x5555565391b0 <error_fatal>) at /home/root/git/qemu2.git/hw/i386/pc.c:1101
        #10 0x00005555557fa33e in pc_cpus_init (pcms=pcms@entry=0x5555565f9690)
            at /home/root/git/qemu2.git/hw/i386/pc.c:1184
        #11 0x00005555557fe0f6 in pc_q35_init (machine=0x5555565f9690) at /home/root/git/qemu2.git/hw/i386/pc_q35.c:121
        #12 0x000055555574fbad in main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at vl.c:4562
      Signed-off-by: NAnthony Xu <anthony.xu@intel.com>
      Message-id: 1494369432-15418-1-git-send-email-anthony.xu@intel.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      5651743c
    • S
      aio: add missing aio_notify() to aio_enable_external() · 321d1dba
      Stefan Hajnoczi 提交于
      The main loop uses aio_disable_external()/aio_enable_external() to
      temporarily disable processing of external AioContext clients like
      device emulation.
      
      This allows monitor commands to quiesce I/O and prevent the guest from
      submitting new requests while a monitor command is in progress.
      
      The aio_enable_external() API is currently broken when an IOThread is in
      aio_poll() waiting for fd activity when the main loop re-enables
      external clients.  Incrementing ctx->external_disable_cnt does not wake
      the IOThread from ppoll(2) so fd processing remains suspended and leads
      to unresponsive emulated devices.
      
      This patch adds an aio_notify() call to aio_enable_external() so the
      IOThread is kicked out of ppoll(2) and will re-arm the file descriptors.
      
      The bug can be reproduced as follows:
      
        $ qemu -M accel=kvm -m 1024 \
               -object iothread,id=iothread0 \
               -device virtio-scsi-pci,iothread=iothread0,id=virtio-scsi-pci0 \
               -drive if=none,id=drive0,aio=native,cache=none,format=raw,file=test.img \
               -device scsi-hd,id=scsi-hd0,drive=drive0 \
               -qmp tcp::5555,server,nowait
      
        $ scripts/qmp/qmp-shell localhost:5555
        (qemu) blockdev-snapshot-sync device=drive0 snapshot-file=sn1.qcow2
               mode=absolute-paths format=qcow2
      
      After blockdev-snapshot-sync completes the SCSI disk will be
      unresponsive.  This leads to request timeouts inside the guest.
      Reported-by: NQianqian Zhu <qizhu@redhat.com>
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Message-id: 20170508180705.20609-1-stefanha@redhat.com
      Suggested-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      321d1dba
    • E
      block: Simplify BDRV_BLOCK_RAW recursion · ee29d6ad
      Eric Blake 提交于
      Since we are already in coroutine context during the body of
      bdrv_co_get_block_status(), we can shave off a few layers of
      wrappers when recursing to query the protocol when a format driver
      returned BDRV_BLOCK_RAW.
      
      Note that we are already using the correct recursion later on in
      the same function, when probing whether the protocol layer is sparse
      in order to find out if we can add BDRV_BLOCK_ZERO to an existing
      BDRV_BLOCK_DATA|BDRV_BLOCK_OFFSET_VALID.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Message-id: 20170504173745.27414-1-eblake@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      ee29d6ad
    • D
      coroutine: remove GThread implementation · 33c53c54
      Daniel P. Berrange 提交于
      The GThread implementation is not functional enough to actually
      run QEMU reliably. While it was potentially useful for debugging,
      we have a scripts/qemugdb/coroutine.py to enable tracing of
      ucontext coroutines in GDB, so that removes the only reason for
      GThread to exist.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Acked-by: NAlex Bennée <alex.bennee@linaro.org>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      33c53c54