mirror of
git://git.yoctoproject.org/meta-virtualization.git
synced 2025-07-19 20:59:41 +02:00

Pull to the current tip of the stable 4.13 branch and apply an upstream 4.14-release-acked patch to xen-tools for a compiler warning in kdd. Signed-off-by: Christopher Clark <christopher.w.clark@gmail.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
61 lines
2.2 KiB
Diff
61 lines
2.2 KiB
Diff
From 3471cafbdda35eacf04670881dd2aee2558b4f08 Mon Sep 17 00:00:00 2001
|
|
From: Tim Deegan <tim@xen.org>
|
|
Date: Fri, 26 Jun 2020 10:40:44 +0000
|
|
Subject: [PATCH] kdd: stop using [0] arrays to access packet contents
|
|
|
|
GCC 10 is unhappy about this, and we already use 64k buffers
|
|
in the only places where packets are allocated, so move the
|
|
64k size into the packet definition.
|
|
|
|
Reported-by: Olaf Hering <olaf@aepfle.de>
|
|
Signed-off-by: Tim Deegan <tim@xen.org>
|
|
Acked-by: Wei Liu <wl@xen.org>
|
|
Release-acked-by: Paul Durrant <paul@xen.org>
|
|
---
|
|
tools/debugger/kdd/kdd.c | 4 ++--
|
|
tools/debugger/kdd/kdd.h | 3 +--
|
|
2 files changed, 3 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/tools/debugger/kdd/kdd.c b/tools/debugger/kdd/kdd.c
|
|
index 3ebda9b12c..866532f0c7 100644
|
|
--- a/tools/debugger/kdd/kdd.c
|
|
+++ b/tools/debugger/kdd/kdd.c
|
|
@@ -79,11 +79,11 @@ typedef struct {
|
|
/* State of the debugger stub */
|
|
typedef struct {
|
|
union {
|
|
- uint8_t txb[sizeof (kdd_hdr) + 65536]; /* Marshalling area for tx */
|
|
+ uint8_t txb[sizeof (kdd_hdr)]; /* Marshalling area for tx */
|
|
kdd_pkt txp; /* Also readable as a packet structure */
|
|
};
|
|
union {
|
|
- uint8_t rxb[sizeof (kdd_hdr) + 65536]; /* Marshalling area for rx */
|
|
+ uint8_t rxb[sizeof (kdd_hdr)]; /* Marshalling area for rx */
|
|
kdd_pkt rxp; /* Also readable as a packet structure */
|
|
};
|
|
unsigned int cur; /* Offset into rx where we'll put the next byte */
|
|
diff --git a/tools/debugger/kdd/kdd.h b/tools/debugger/kdd/kdd.h
|
|
index bfb00ba5c5..b9a17440df 100644
|
|
--- a/tools/debugger/kdd/kdd.h
|
|
+++ b/tools/debugger/kdd/kdd.h
|
|
@@ -68,7 +68,6 @@ typedef struct {
|
|
uint16_t len; /* Payload length, excl. header and trailing byte */
|
|
uint32_t id; /* Echoed in responses */
|
|
uint32_t sum; /* Unsigned sum of all payload bytes */
|
|
- uint8_t payload[0];
|
|
} PACKED kdd_hdr;
|
|
|
|
#define KDD_PKT_CMD 0x0002 /* Debugger commands (and replies to them) */
|
|
@@ -323,7 +322,7 @@ typedef struct {
|
|
kdd_msg msg;
|
|
kdd_reg reg;
|
|
kdd_stc stc;
|
|
- uint8_t payload[0];
|
|
+ uint8_t payload[65536];
|
|
};
|
|
} PACKED kdd_pkt;
|
|
|
|
--
|
|
2.17.1
|
|
|