File xen.d44cbbe0f3243afcc56e47dcfa97bbfe23e46fbb.patch of Package xen
From: Wei Liu <wl@xen.org>
Date: Fri, 3 Jul 2020 20:10:01 +0000
Subject: d44cbbe0f3243afcc56e47dcfa97bbfe23e46fbb
kdd: fix build again
Restore Tim's patch. The one that was committed was recreated by me
because git didn't accept my saved copy. I made some mistakes while
recreating that patch and here we are.
Fixes: 3471cafbdda3 ("kdd: stop using [0] arrays to access packet contents")
Reported-by: Michael Young <m.a.young@durham.ac.uk>
Signed-off-by: Wei Liu <wl@xen.org>
Reviewed-by: Tim Deegan <tim@xen.org>
Release-acked-by: Paul Durrant <paul@xen.org>
---
tools/debugger/kdd/kdd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/tools/debugger/kdd/kdd.c
+++ b/tools/debugger/kdd/kdd.c
@@ -58,29 +58,29 @@ typedef struct {
int mp;
char *name;
uint64_t base; /* KernBase: start looking here */
uint32_t range; /* | and search an area this size */
uint32_t version; /* +-> NtBuildNumber */
uint32_t modules; /* +-> PsLoadedModuleList */
uint32_t prcbs; /* +-> KiProcessorBlock */
} kdd_os;
/* State of the debugger stub */
typedef struct {
union {
- uint8_t txb[sizeof (kdd_hdr)]; /* Marshalling area for tx */
+ uint8_t txb[sizeof (kdd_pkt)]; /* Marshalling area for tx */
kdd_pkt txp; /* Also readable as a packet structure */
};
union {
- uint8_t rxb[sizeof (kdd_hdr)]; /* Marshalling area for rx */
+ uint8_t rxb[sizeof (kdd_pkt)]; /* 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 */
uint32_t next_id; /* ID of next packet we will send */
int running; /* Are the guest's processors active? */
int cpuid; /* Current selected CPU */
int fd; /* TCP socket for client comms */
FILE *log; /* For tracing output */
int verbosity; /* How much detail to trace */
kdd_guest *guest; /* Arch-specific state for guest control */
kdd_os os; /* OS-specific magic numbers */
} kdd_state;