Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:olh:xen-4.9
xen
xen.3471cafbdda35eacf04670881dd2aee2558b4f08.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File xen.3471cafbdda35eacf04670881dd2aee2558b4f08.patch of Package xen
From: Tim Deegan <tim@xen.org> Date: Fri, 26 Jun 2020 10:40:44 +0000 Subject: 3471cafbdda35eacf04670881dd2aee2558b4f08 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(-) --- 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) + 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 */ 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; --- a/tools/debugger/kdd/kdd.h +++ b/tools/debugger/kdd/kdd.h @@ -59,25 +59,24 @@ * All acks have length 0, id = id of the packet they ack. */ #define KDD_DIR_PKT 0x30303030 /* "0000" */ #define KDD_DIR_ACK 0x69696969 /* "iiii" */ typedef struct { uint32_t dir; /* KDD_DIR_PKT or KDD_DIR_ACK */ uint16_t type; /* Major type. */ 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) */ #define KDD_PKT_MSG 0x0003 /* Kernel messages for the user */ #define KDD_PKT_STC 0x0007 /* State change notification */ #define KDD_PKT_REG 0x000b /* Registry change notification (?) */ #define KDD_PKT_MAX 0x000b #define KDD_ACK_OK 0x0004 /* Checksum, ID and type all fine */ #define KDD_ACK_BAD 0x0005 /* Something is bogus */ #define KDD_ACK_RST 0x0006 /* Not really an ack; one each way to resync */ @@ -314,25 +313,25 @@ typedef struct { /***************************************************************************** * Overall packet type */ typedef struct { kdd_hdr h; /* Major type disambiguates union below */ union { kdd_cmd cmd; kdd_msg msg; kdd_reg reg; kdd_stc stc; - uint8_t payload[0]; + uint8_t payload[65536]; }; } PACKED kdd_pkt; /***************************************************************************** * Processor state layouts */ /* User-visible register files */ typedef union { uint32_t pad[179]; struct {
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor