f8324611 | 24-Aug-2023 |
Peter Maydell <peter.maydell@linaro.org> |
hw/usb/hcd-xhci: Avoid variable-length array in xhci_get_port_bandwidth()
In xhci_get_port_bandwidth(), we use a variable-length array to construct the buffer to send back to the guest. Avoid the VL
hw/usb/hcd-xhci: Avoid variable-length array in xhci_get_port_bandwidth()
In xhci_get_port_bandwidth(), we use a variable-length array to construct the buffer to send back to the guest. Avoid the VLA by using dma_memory_set() to directly request the memory system to fill the guest memory with a string of '80's.
The codebase has very few VLAs, and if we can get rid of them all we can make the compiler error on new additions. This is a defensive measure against security bugs where an on-stack dynamic allocation isn't correctly size-checked (e.g. CVE-2021-3527).
Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20230824164818.2652452-1-peter.maydell@linaro.org>
show more ...
|
0c38e9dd | 20-Feb-2023 |
BALATON Zoltan <balaton@eik.bme.hu> |
hw/usb/ohci: Implement resume on connection status change
If certain bit is set remote wake up should change state from suspended to resume and generate interrupt. There was a todo comment for this,
hw/usb/ohci: Implement resume on connection status change
If certain bit is set remote wake up should change state from suspended to resume and generate interrupt. There was a todo comment for this, implement that by moving existing resume logic to a function and call that.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Message-Id: <35c4d4ccf2f73e6a87cdbd28fb6a1b33de72ed74.1676916640.git.balaton@eik.bme.hu> [PMD: Have ohci_resume() return a boolean] Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
show more ...
|
b08bb02b | 17-Feb-2023 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/usb/xhci-nec: Replace container_of() by NEC_XHCI() QOM cast macro
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-I
hw/usb/xhci-nec: Replace container_of() by NEC_XHCI() QOM cast macro
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230220150515.32549-8-philmd@linaro.org>
show more ...
|
67d58d19 | 17-Feb-2023 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/usb/xhci-nec: Declare QOM macros for NEC_XHCI
NEC_XHCI is a QOM object type. Declare its macros / typedefs using OBJECT_DECLARE_SIMPLE_TYPE().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linar
hw/usb/xhci-nec: Declare QOM macros for NEC_XHCI
NEC_XHCI is a QOM object type. Declare its macros / typedefs using OBJECT_DECLARE_SIMPLE_TYPE().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230220150515.32549-7-philmd@linaro.org>
show more ...
|
ce6ffeae | 20-Feb-2023 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/usb/uhci: Replace container_of() by UHCI_GET_CLASS() QOM macro
By using the QOM UHCI_GET_CLASS() cast macro we don't to use the intermediate PCIDeviceClass variable.
Signed-off-by: Philippe Math
hw/usb/uhci: Replace container_of() by UHCI_GET_CLASS() QOM macro
By using the QOM UHCI_GET_CLASS() cast macro we don't to use the intermediate PCIDeviceClass variable.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230220150515.32549-6-philmd@linaro.org>
show more ...
|
ef177ee1 | 06-Jan-2023 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/usb/uhci: Declare QOM macros using OBJECT_DECLARE_TYPE()
The automatic conversion done during commit a489d1951c ("Use OBJECT_DECLARE_TYPE when possible") missed this model because the typedefs ar
hw/usb/uhci: Declare QOM macros using OBJECT_DECLARE_TYPE()
The automatic conversion done during commit a489d1951c ("Use OBJECT_DECLARE_TYPE when possible") missed this model because the typedefs are in a different file unit (hcd-uhci.c) than where the DECLARE_INSTANCE_CHECKER() is (hcd-uhci.h). Manually convert to OBJECT_DECLARE_TYPE().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230220150515.32549-5-philmd@linaro.org>
show more ...
|