diff options
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu/CVE-2020-25624_1.patch')
-rw-r--r-- | meta/recipes-devtools/qemu/qemu/CVE-2020-25624_1.patch | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2020-25624_1.patch b/meta/recipes-devtools/qemu/qemu/CVE-2020-25624_1.patch new file mode 100644 index 0000000000..a46b5be193 --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu/CVE-2020-25624_1.patch | |||
@@ -0,0 +1,87 @@ | |||
1 | From fbec359e9279ce78908b9f2af2c264e7448336af Mon Sep 17 00:00:00 2001 | ||
2 | From: Guenter Roeck <linux@roeck-us.net> | ||
3 | Date: Mon, 17 Feb 2020 12:48:10 -0800 | ||
4 | Subject: [PATCH] hw: usb: hcd-ohci: Move OHCISysBusState and TYPE_SYSBUS_OHCI | ||
5 | to include file | ||
6 | |||
7 | We need to be able to use OHCISysBusState outside hcd-ohci.c, so move it | ||
8 | to its include file. | ||
9 | |||
10 | Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> | ||
11 | Signed-off-by: Guenter Roeck <linux@roeck-us.net> | ||
12 | Tested-by: Niek Linnenbank <nieklinnenbank@gmail.com> | ||
13 | Message-id: 20200217204812.9857-2-linux@roeck-us.net | ||
14 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
15 | |||
16 | Upstream-Status: Backport | ||
17 | CVE: CVE-2020-25624 patch #1 | ||
18 | Signed-off-by: Armin Kuster <akuster@mvista.com> | ||
19 | |||
20 | --- | ||
21 | hw/usb/hcd-ohci.c | 15 --------------- | ||
22 | hw/usb/hcd-ohci.h | 16 ++++++++++++++++ | ||
23 | 2 files changed, 16 insertions(+), 15 deletions(-) | ||
24 | |||
25 | diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c | ||
26 | index 8a94bd004a..1e6e85e86a 100644 | ||
27 | --- a/hw/usb/hcd-ohci.c | ||
28 | +++ b/hw/usb/hcd-ohci.c | ||
29 | @@ -1870,21 +1870,6 @@ void ohci_sysbus_die(struct OHCIState *ohci) | ||
30 | ohci_bus_stop(ohci); | ||
31 | } | ||
32 | |||
33 | -#define TYPE_SYSBUS_OHCI "sysbus-ohci" | ||
34 | -#define SYSBUS_OHCI(obj) OBJECT_CHECK(OHCISysBusState, (obj), TYPE_SYSBUS_OHCI) | ||
35 | - | ||
36 | -typedef struct { | ||
37 | - /*< private >*/ | ||
38 | - SysBusDevice parent_obj; | ||
39 | - /*< public >*/ | ||
40 | - | ||
41 | - OHCIState ohci; | ||
42 | - char *masterbus; | ||
43 | - uint32_t num_ports; | ||
44 | - uint32_t firstport; | ||
45 | - dma_addr_t dma_offset; | ||
46 | -} OHCISysBusState; | ||
47 | - | ||
48 | static void ohci_realize_pxa(DeviceState *dev, Error **errp) | ||
49 | { | ||
50 | OHCISysBusState *s = SYSBUS_OHCI(dev); | ||
51 | diff --git a/hw/usb/hcd-ohci.h b/hw/usb/hcd-ohci.h | ||
52 | index 16e3f1e13a..5c8819aedf 100644 | ||
53 | --- a/hw/usb/hcd-ohci.h | ||
54 | +++ b/hw/usb/hcd-ohci.h | ||
55 | @@ -22,6 +22,7 @@ | ||
56 | #define HCD_OHCI_H | ||
57 | |||
58 | #include "sysemu/dma.h" | ||
59 | +#include "hw/usb.h" | ||
60 | |||
61 | /* Number of Downstream Ports on the root hub: */ | ||
62 | #define OHCI_MAX_PORTS 15 | ||
63 | @@ -90,6 +91,21 @@ typedef struct OHCIState { | ||
64 | void (*ohci_die)(struct OHCIState *ohci); | ||
65 | } OHCIState; | ||
66 | |||
67 | +#define TYPE_SYSBUS_OHCI "sysbus-ohci" | ||
68 | +#define SYSBUS_OHCI(obj) OBJECT_CHECK(OHCISysBusState, (obj), TYPE_SYSBUS_OHCI) | ||
69 | + | ||
70 | +typedef struct { | ||
71 | + /*< private >*/ | ||
72 | + SysBusDevice parent_obj; | ||
73 | + /*< public >*/ | ||
74 | + | ||
75 | + OHCIState ohci; | ||
76 | + char *masterbus; | ||
77 | + uint32_t num_ports; | ||
78 | + uint32_t firstport; | ||
79 | + dma_addr_t dma_offset; | ||
80 | +} OHCISysBusState; | ||
81 | + | ||
82 | extern const VMStateDescription vmstate_ohci_state; | ||
83 | |||
84 | void usb_ohci_init(OHCIState *ohci, DeviceState *dev, uint32_t num_ports, | ||
85 | -- | ||
86 | 2.25.1 | ||
87 | |||