diff options
| author | Christopher Clark <christopher.w.clark@gmail.com> | 2020-06-29 18:54:47 -0700 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2020-07-06 16:25:56 -0400 |
| commit | 345505989ce65f2486aa3afdf325cc68c28f1d55 (patch) | |
| tree | cee861990f2534e506d1c4a21729110d75e848d5 /recipes-extended/xen/files/xen-tools-kdd-stop-using-0-arrays-to-access-packet-contents.patch | |
| parent | 8af29790eee317c3b1da3acd87b10659eaa914a7 (diff) | |
| download | meta-virtualization-345505989ce65f2486aa3afdf325cc68c28f1d55.tar.gz | |
xen, xen-tools: update revision to Xen 4.13
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>
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.patch | 60 |
1 files changed, 60 insertions, 0 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 new file mode 100644 index 00000000..c1b110df --- /dev/null +++ b/recipes-extended/xen/files/xen-tools-kdd-stop-using-0-arrays-to-access-packet-contents.patch | |||
| @@ -0,0 +1,60 @@ | |||
| 1 | From 3471cafbdda35eacf04670881dd2aee2558b4f08 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Tim Deegan <tim@xen.org> | ||
| 3 | Date: Fri, 26 Jun 2020 10:40:44 +0000 | ||
| 4 | Subject: [PATCH] kdd: stop using [0] arrays to access packet contents | ||
| 5 | |||
| 6 | GCC 10 is unhappy about this, and we already use 64k buffers | ||
| 7 | in the only places where packets are allocated, so move the | ||
| 8 | 64k size into the packet definition. | ||
| 9 | |||
| 10 | Reported-by: Olaf Hering <olaf@aepfle.de> | ||
| 11 | Signed-off-by: Tim Deegan <tim@xen.org> | ||
| 12 | Acked-by: Wei Liu <wl@xen.org> | ||
| 13 | Release-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 | |||
| 19 | diff --git a/tools/debugger/kdd/kdd.c b/tools/debugger/kdd/kdd.c | ||
| 20 | index 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 */ | ||
| 37 | diff --git a/tools/debugger/kdd/kdd.h b/tools/debugger/kdd/kdd.h | ||
| 38 | index 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 | -- | ||
| 59 | 2.17.1 | ||
| 60 | |||
