summaryrefslogtreecommitdiffstats
path: root/recipes-extended/xen/files/xen-tools-kdd-stop-using-0-arrays-to-access-packet-contents.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-extended/xen/files/xen-tools-kdd-stop-using-0-arrays-to-access-packet-contents.patch')
-rw-r--r--recipes-extended/xen/files/xen-tools-kdd-stop-using-0-arrays-to-access-packet-contents.patch60
1 files changed, 0 insertions, 60 deletions
diff --git a/recipes-extended/xen/files/xen-tools-kdd-stop-using-0-arrays-to-access-packet-contents.patch b/recipes-extended/xen/files/xen-tools-kdd-stop-using-0-arrays-to-access-packet-contents.patch
deleted file mode 100644
index c1b110df..00000000
--- a/recipes-extended/xen/files/xen-tools-kdd-stop-using-0-arrays-to-access-packet-contents.patch
+++ /dev/null
@@ -1,60 +0,0 @@
1From 3471cafbdda35eacf04670881dd2aee2558b4f08 Mon Sep 17 00:00:00 2001
2From: Tim Deegan <tim@xen.org>
3Date: Fri, 26 Jun 2020 10:40:44 +0000
4Subject: [PATCH] kdd: stop using [0] arrays to access packet contents
5
6GCC 10 is unhappy about this, and we already use 64k buffers
7in the only places where packets are allocated, so move the
864k size into the packet definition.
9
10Reported-by: Olaf Hering <olaf@aepfle.de>
11Signed-off-by: Tim Deegan <tim@xen.org>
12Acked-by: Wei Liu <wl@xen.org>
13Release-acked-by: Paul Durrant <paul@xen.org>
14---
15 tools/debugger/kdd/kdd.c | 4 ++--
16 tools/debugger/kdd/kdd.h | 3 +--
17 2 files changed, 3 insertions(+), 4 deletions(-)
18
19diff --git a/tools/debugger/kdd/kdd.c b/tools/debugger/kdd/kdd.c
20index 3ebda9b12c..866532f0c7 100644
21--- a/tools/debugger/kdd/kdd.c
22+++ b/tools/debugger/kdd/kdd.c
23@@ -79,11 +79,11 @@ typedef struct {
24 /* State of the debugger stub */
25 typedef struct {
26 union {
27- uint8_t txb[sizeof (kdd_hdr) + 65536]; /* Marshalling area for tx */
28+ uint8_t txb[sizeof (kdd_hdr)]; /* Marshalling area for tx */
29 kdd_pkt txp; /* Also readable as a packet structure */
30 };
31 union {
32- uint8_t rxb[sizeof (kdd_hdr) + 65536]; /* Marshalling area for rx */
33+ uint8_t rxb[sizeof (kdd_hdr)]; /* Marshalling area for rx */
34 kdd_pkt rxp; /* Also readable as a packet structure */
35 };
36 unsigned int cur; /* Offset into rx where we'll put the next byte */
37diff --git a/tools/debugger/kdd/kdd.h b/tools/debugger/kdd/kdd.h
38index bfb00ba5c5..b9a17440df 100644
39--- a/tools/debugger/kdd/kdd.h
40+++ b/tools/debugger/kdd/kdd.h
41@@ -68,7 +68,6 @@ typedef struct {
42 uint16_t len; /* Payload length, excl. header and trailing byte */
43 uint32_t id; /* Echoed in responses */
44 uint32_t sum; /* Unsigned sum of all payload bytes */
45- uint8_t payload[0];
46 } PACKED kdd_hdr;
47
48 #define KDD_PKT_CMD 0x0002 /* Debugger commands (and replies to them) */
49@@ -323,7 +322,7 @@ typedef struct {
50 kdd_msg msg;
51 kdd_reg reg;
52 kdd_stc stc;
53- uint8_t payload[0];
54+ uint8_t payload[65536];
55 };
56 } PACKED kdd_pkt;
57
58--
592.17.1
60