1. 23 2月, 2016 7 次提交
    • G
      ohci: allocate timer only once. · fa1298c2
      Gerd Hoffmann 提交于
      Allocate timer once, at init time, instead of allocating/freeing
      it all the time when starting/stopping the bus.  Simplifies the
      code, also fixes bugs (memory leak) due to missing checks whenever
      the time is already allocated or not.
      
      Cc: Prasad J Pandit <pjp@fedoraproject.org>
      Reported-by: NZuozhi Fzz <zuozhi.fzz@alibaba-inc.com>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      fa1298c2
    • G
      usb: add pid check at the first of uhci_handle_td() · 5f77e06b
      Gonglei 提交于
      pid can be gotten from uhci device memory in uhci_handle_td(),
      so the guest can trigger assert qemu if we get an invalid pid.
      And the uhci spec 2.1.2 tells us The Host Controller sets Host
      Controller Process Error bit to 1 when it detects a fatal error
      and indicates that the Host Controller suffered a consistency
      check failure while processing a Transfer Descriptor. An example
      of a consistency check failure would be finding an illegal PID
      field while processing the packet header portion of the TD.
      When this error occurs, the Host Controller clears the Run/Stop
      bit in the Command register to prevent further schedule execution.
      
      We'd better to set UHCI_STS_HCPERR and kick an interrupt, check
      the pid value at the first of uhci_handle_td function.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1070027Signed-off-by: NGonglei <arei.gonglei@huawei.com>
      Message-id: 1455867238-4720-1-git-send-email-arei.gonglei@huawei.com
      
      [ applied minor codestyle fix ]
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      5f77e06b
    • P
      usb: check RNDIS buffer offsets & length · fe3c546c
      Prasad J Pandit 提交于
      When processing remote NDIS control message packets,
      the USB Net device emulator uses a fixed length(4096) data buffer.
      The incoming informationBufferOffset & Length combination could
      overflow and cross that range. Check control message buffer
      offsets and length to avoid it.
      Reported-by: NQinghao Tang <luodalongde@gmail.com>
      Signed-off-by: NPrasad J Pandit <pjp@fedoraproject.org>
      Message-id: 1455648821-17340-3-git-send-email-ppandit@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      fe3c546c
    • P
      usb: check RNDIS message length · 64c9bc18
      Prasad J Pandit 提交于
      When processing remote NDIS control message packets, the USB Net
      device emulator uses a fixed length(4096) data buffer. The incoming
      packet length could exceed this limit. Add a check to avoid it.
      Signed-off-by: NPrasad J Pandit <pjp@fedoraproject.org>
      Message-id: 1455648821-17340-2-git-send-email-ppandit@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      64c9bc18
    • P
      tusb6010: move from hw/timer to hw/usb · 14ec7b2c
      Peter Maydell 提交于
      The TUSB6010 is a USB controller (as the name suggests). Move it from
      hw/timer (where it was accidentally filed in 2013 when we moved
      everything out of hw/) to hw/usb.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1455883404-10976-1-git-send-email-peter.maydell@linaro.org
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      14ec7b2c
    • P
      usb: check USB configuration descriptor object · 80eecda8
      Prasad J Pandit 提交于
      When processing remote NDIS control message packets, the USB Net
      device emulator checks to see if the USB configuration descriptor
      object is of RNDIS type(2). But it does not check if it is null,
      which leads to a null dereference error. Add check to avoid it.
      Reported-by: NQinghao Tang <luodalongde@gmail.com>
      Signed-off-by: NPrasad J Pandit <pjp@fedoraproject.org>
      Message-id: 1455188480-14688-1-git-send-email-ppandit@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      80eecda8
    • P
      Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging · 8eb779e4
      Peter Maydell 提交于
      Block layer patches
      
      # gpg: Signature made Mon 22 Feb 2016 15:59:25 GMT using RSA key ID C88F2FD6
      # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>"
      
      * remotes/kevin/tags/for-upstream: (34 commits)
        qemu-iotests: 140: make description slightly more verbose
        qemu-iotests: 140: don't use IDE device
        qemu-iotests: 067: ignore QMP events
        blockdev: unset inappropriate flags when changing medium
        MAINTAINERS: Add myself as maintainer of the throttling code
        docs: Document the throttling infrastructure
        qapi: Correct the name of the iops_rd parameter
        qemu-iotests: Extend iotest 093 to test bursts
        throttle: Test throttle_compute_wait() during bursts
        throttle: Check that burst_level leaks correctly
        qapi: Add burst length fields to BlockDeviceInfo
        qapi: Add burst length parameters to block_set_io_throttle
        throttle: Add command-line settings to define the burst periods
        throttle: Add support for burst periods
        throttle: Use throttle_config_init() to initialize ThrottleConfig
        throttle: Merge all functions that check the configuration into one
        throttle: Set always an average value when setting a maximum value
        throttle: Make throttle_is_valid() set errp
        throttle: Make throttle_max_is_missing_limit() set errp
        throttle: Make throttle_conflicting() set errp
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      8eb779e4
  2. 22 2月, 2016 33 次提交