1. 27 5月, 2016 6 次提交
  2. 24 5月, 2016 23 次提交
  3. 23 5月, 2016 11 次提交
    • P
      Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging · c9158547
      Peter Maydell 提交于
      * NMI cleanups (Bandan)
      * RAMBlock/Memory cleanups and fixes (Dominik, Gonglei, Fam, me)
      * first part of linuxboot support for fw_cfg DMA (Richard)
      * IOAPIC fix (Peter Xu)
      * iSCSI SG_IO fix (Vadim)
      * Various infrastructure bug fixes (Zhijian, Peter M., Stefan)
      * CVE fixes (Prasad)
      
      # gpg: Signature made Mon 23 May 2016 16:06:18 BST using RSA key ID 78C7AE83
      # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>"
      # gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>"
      
      * remotes/bonzini/tags/for-upstream: (24 commits)
        cpus: call the core nmi injection function
        nmi: remove x86 specific nmi handling
        target-i386: add a generic x86 nmi handler
        coccinelle: add g_assert_cmp* to macro file
        iscsi: pass SCSI status back for SG_IO
        esp: check dma length before reading scsi command(CVE-2016-4441)
        esp: check command buffer length before write(CVE-2016-4439)
        scripts/signrom.py: Check for magic in option ROMs.
        scripts/signrom.py: Allow option ROM checksum script to write the size header.
        Remove config-devices.mak on 'make clean'
        cpus.c: Use pthread_sigmask() rather than sigprocmask()
        memory: remove unnecessary masking of MemoryRegion ram_addr
        memory: Drop FlatRange.romd_mode
        memory: Remove code for mr->may_overlap
        exec: adjust rcu_read_lock requirement
        memory: drop find_ram_block()
        vl: change runstate only if new state is different from current state
        ioapic: clear remote irr bit for edge-triggered interrupts
        ioapic: keep RO bits for IOAPIC entry
        target-i386: key sfence availability on CPUID_SSE, not CPUID_SSE2
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      c9158547
    • B
      cpus: call the core nmi injection function · 1453e662
      Bandan Das 提交于
      We can call the common function here directly since
      x86 specific actions will be taken care of by the arch
      specific nmi handler
      Signed-off-by: NBandan Das <bsd@redhat.com>
      Message-Id: <1463761717-26558-4-git-send-email-bsd@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      1453e662
    • B
      nmi: remove x86 specific nmi handling · f7e981f2
      Bandan Das 提交于
      nmi_monitor_handle is wired to call the x86 nmi
      handler. So, we can directly use it at call sites.
      Signed-off-by: NBandan Das <bsd@redhat.com>
      Message-Id: <1463761717-26558-3-git-send-email-bsd@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      f7e981f2
    • B
      target-i386: add a generic x86 nmi handler · 1255166b
      Bandan Das 提交于
      Instead of having x86 ifdefs in core nmi code, this
      change adds a arch specific handler that the nmi common
      code can call.
      Signed-off-by: NBandan Das <bsd@redhat.com>
      Message-Id: <1463761717-26558-2-git-send-email-bsd@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      1255166b
    • P
      coccinelle: add g_assert_cmp* to macro file · 6ad978e9
      Paolo Bonzini 提交于
      This helps applying semantic patches to unit tests.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      6ad978e9
    • V
      iscsi: pass SCSI status back for SG_IO · 644c6869
      Vadim Rozenfeld 提交于
      Signed-off-by: NVadim Rozenfeld <vrozenfe@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      644c6869
    • P
      esp: check dma length before reading scsi command(CVE-2016-4441) · 6c1fef6b
      Prasad J Pandit 提交于
      The 53C9X Fast SCSI Controller(FSC) comes with an internal 16-byte
      FIFO buffer. It is used to handle command and data transfer.
      Routine get_cmd() uses DMA to read scsi commands into this buffer.
      Add check to validate DMA length against buffer size to avoid any
      overrun.
      
      Fixes CVE-2016-4441.
      Reported-by: NLi Qiang <liqiang6-s@360.cn>
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NPrasad J Pandit <pjp@fedoraproject.org>
      Message-Id: <1463654371-11169-3-git-send-email-ppandit@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      6c1fef6b
    • P
      esp: check command buffer length before write(CVE-2016-4439) · c98c6c10
      Prasad J Pandit 提交于
      The 53C9X Fast SCSI Controller(FSC) comes with an internal 16-byte
      FIFO buffer. It is used to handle command and data transfer. While
      writing to this command buffer 's->cmdbuf[TI_BUFSZ=16]', a check
      was missing to validate input length. Add check to avoid OOB write
      access.
      
      Fixes CVE-2016-4439.
      Reported-by: NLi Qiang <liqiang6-s@360.cn>
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NPrasad J Pandit <pjp@fedoraproject.org>
      Message-Id: <1463654371-11169-2-git-send-email-ppandit@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      c98c6c10
    • R
      scripts/signrom.py: Check for magic in option ROMs. · fd28938b
      Richard W.M. Jones 提交于
      Because of the risk that compilers might not emit the asm() block at
      the beginning of the option ROM, check that the ROM contains the
      required magic signature.
      Signed-off-by: NRichard W.M. Jones <rjones@redhat.com>
      Message-Id: <1463000807-18015-3-git-send-email-rjones@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      fd28938b
    • R
      scripts/signrom.py: Allow option ROM checksum script to write the size header. · 6f71b779
      Richard W.M. Jones 提交于
      Modify the signrom.py script so that if the size byte in the header is
      0 (ie. not set) then the script will set the size.  If the size byte
      is non-zero then we do the same as before, so this doesn't require
      changes to any existing ROM sourcecode.
      Signed-off-by: NRichard W.M. Jones <rjones@redhat.com>
      Message-Id: <1463000807-18015-2-git-send-email-rjones@redhat.com>
      6f71b779
    • P
      Remove config-devices.mak on 'make clean' · 168340b6
      Peter Maydell 提交于
      Our dependency mechanism works like this:
       * on first build there is neither a .o nor a .d
       * we create the .d as a side effect of creating the .o
       * for rebuilds we know when we need to update the .o,
         which also updates the .d
      
      This system requires that you're never in a situation where there is
      a .o file but no .d (because then we will never realise we need to
      build the .d, and we will not have the dependency information about
      when to rebuild the .o).
      
      This is working fine for our object files, but we also try to use it
      for $TARGET/config-devices.mak (where the dependency file is
      in $TARGET-config-devices.mak.d). Unfortunately "make clean" doesn't
      remove config-devices.mak, which means that it puts us in the
      forbidden situation of "object file exists but not its .d file".
      This in turn means that we will fail to notice when we need to rebuild:
        mkdir build/depbug
        (cd build/depbug && '../../configure')
        make -C build/depbug -j8
        make -C build/depbug clean
        echo "CONFIG_CANARY = y" >> default-configs/arm-softmmu.mak
        make -C build/depbug
        grep CANARY build/depbug/aarch64-softmmu/config-devices.mak
      
      The CANARY token should show up in config-devices.mak but does not.
      
      Fix this bug by making "make clean" delete the config-devices.mak files.
      config-all-devices.mak doesn't have the same problem since it has
      no .d file, but delete it too, since it is created by "make" and
      logically should be removed by "make clean".
      
      (Note that it is important not to remove config-devices.mak until
      after we have recursively run 'make clean' in the subdirectories.)
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-Id: <1463484451-22979-1-git-send-email-peter.maydell@linaro.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      168340b6