qemu-patch-raspberry4/hw
Greg Kurz a4d9985450 virtio-9p: message header is 7-byte long
The 9p spec at http://man.cat-v.org/plan_9/5/intro reads:

 "Each 9P message begins with a four-byte size field specify-
  ing the length in bytes of the complete message including
  the four bytes of the size field itself.  The next byte is
  the message type, one of the constants in the enumeration in
  the include file <fcall.h>.  The next two bytes are an iden-
  tifying tag, described below."

ie, each message starts with a 7-byte long header.

The core 9P code already assumes this pretty much everywhere. This patch
does the following:
- makes the assumption explicit in the common 9p.h header, since it isn't
  related to the transport
- open codes the header size in handle_9p_output() and hardens the sanity
  check on the space needed for the reply message

Signed-off-by: Greg Kurz <groug@kaod.org>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
2017-06-29 15:11:50 +02:00
..
9pfs virtio-9p: message header is 7-byte long 2017-06-29 15:11:50 +02:00
acpi pcihp: use get_uint() for "bsel" property 2017-06-20 14:31:32 +02:00
adc STM32F2xx: Add the ADC device 2016-10-04 13:28:07 +01:00
alpha memory: tune last param of iommu_ops.translate() 2017-05-25 21:25:27 +03:00
arm bcm2835_fb: use {get, set}_uint() for "vcram-size" and "vcram-base" 2017-06-20 14:31:32 +02:00
audio audio: Rename hw/audio/audio.h to hw/audio/soundhw.h 2017-05-19 10:48:54 +02:00
block xen-disk: add support for multi-page shared rings 2017-06-27 15:01:56 -07:00
bt be-hci: use backend functions 2017-06-02 11:33:53 +04:00
char -----BEGIN PGP SIGNATURE----- 2017-06-05 10:09:14 +01:00
core platform-bus: use get_uint() for "addr" property 2017-06-20 14:31:32 +02:00
cpu hw/cpu: core.c can be compiled as common object 2017-06-09 12:02:55 +10:00
cris cris: Fix broken header guard in hw/cris/boot.h 2016-07-12 16:20:46 +02:00
display Remove/replace sysemu/char.h inclusion 2017-06-02 11:33:52 +04:00
dma hw/dma: QOM'ify sun4m_iommu.c 2017-06-02 05:54:43 +01:00
gpio qdev: Replace cannot_instantiate_with_device_add_yet with !user_creatable 2017-05-17 10:37:00 -03:00
i2c migration/next for 20170601 2017-06-02 14:07:53 +01:00
i386 QAPI patches for 2017-06-09 2017-06-22 11:34:39 +01:00
ide allwinner-ahci: Remove user_creatable flag 2017-05-17 10:37:01 -03:00
input ps2: reset queue in ps2_reset_keyboard 2017-06-23 11:51:50 +02:00
intc arm: use get_uint() for "mp-affinity" property 2017-06-20 14:31:33 +02:00
ipack ipack: Update e-mail address 2016-05-18 15:04:27 +03:00
ipmi char: move CharBackend handling in char-fe unit 2017-06-02 11:33:53 +04:00
isa chardev: move headers to include/chardev 2017-06-02 11:33:52 +04:00
lm32 char: rename CharDriverState Chardev 2017-01-27 18:07:59 +01:00
m68k hw/m68k: QOMify the ColdFire interrupt controller 2017-02-18 22:23:31 +01:00
mem pc-dimm: make "size" property uint64 2017-06-20 14:31:32 +02:00
microblaze Remove reduntant qemu: from error functions 2017-05-07 09:57:51 +03:00
mips chardev: move headers to include/chardev 2017-06-02 11:33:52 +04:00
misc introduce mmio_interface 2017-06-27 15:09:15 +02:00
moxie hw: explicitly include qemu-common.h and cpu.h 2016-03-22 22:20:17 +01:00
net qdev: Rename DEFINE_PROP_DEFAULT() to DEFINE_PROP_SIGNED() 2017-06-20 14:31:32 +02:00
nios2 Remove reduntant qemu: from error functions 2017-05-07 09:57:51 +03:00
nvram spapr_nvram: Check return value from blk_getlength() 2017-06-06 09:18:32 +10:00
openrisc target/openrisc: Support non-busy idle state using PMR SPR 2017-05-04 09:39:14 +09:00
pci msix: trace control bit write op 2017-06-06 20:18:35 +02:00
pci-bridge hw/pcie: fix the generic pcie root port to support migration 2017-06-08 22:02:37 +03:00
pci-host QAPI patches for 2017-06-09 2017-06-22 11:34:39 +01:00
pcmcia hw: Clean up includes 2016-01-29 15:07:25 +00:00
ppc pnv-core: use get_uint() for "core-pir" property 2017-06-20 14:31:33 +02:00
s390x migration/next for 20170613 2017-06-13 13:51:29 +01:00
scsi vhost-user-scsi: Introduce vhost-user-scsi host device 2017-06-15 11:18:40 +02:00
sd generic-sdhci: Remove user_creatable flag 2017-05-17 10:37:01 -03:00
sh4 shutdown: Add source information to SHUTDOWN and RESET 2017-05-23 13:28:17 +02:00
smbios stubs: move smbios stubs to hw/smbios 2017-01-16 17:52:35 +01:00
sparc -----BEGIN PGP SIGNATURE----- 2017-06-05 10:09:14 +01:00
sparc64 hw/sparc: use ARRAY_SIZE() macro 2017-06-04 18:42:55 +03:00
ssi xilinx_spips: allow mmio execution 2017-06-27 15:09:15 +02:00
timer timer/aspeed: fix timer enablement when a reload is not set 2017-06-13 14:57:00 +01:00
tpm clean-up: removed duplicate #includes 2016-10-28 18:17:24 +03:00
tricore Remove reduntant qemu: from error functions 2017-05-07 09:57:51 +03:00
unicore32 clean-up: removed duplicate #includes 2016-10-28 18:17:24 +03:00
usb -----BEGIN PGP SIGNATURE----- 2017-06-22 15:09:48 +01:00
vfio pci, virtio, vhost: fixes 2017-05-30 14:15:04 +01:00
virtio vhost-user-scsi: Introduce vhost-user-scsi host device 2017-06-15 11:18:40 +02:00
watchdog shutdown: Add source information to SHUTDOWN and RESET 2017-05-23 13:28:17 +02:00
xen migration: Move remaining exported functions to migration/misc.h 2017-06-13 11:00:45 +02:00
xenpv shutdown: Add source information to SHUTDOWN and RESET 2017-05-23 13:28:17 +02:00
xtensa target/xtensa: support output to chardev console 2017-06-06 02:40:48 -07:00
Makefile.objs acpi: filter based on CONFIG_ACPI_X86 rather than TARGET 2017-01-16 17:52:35 +01:00