qemu-e2k/hw
Haozhong Zhang 53000638f2 acpi: fix assert failure caused by commit 35c5a52d
Commit 35c5a52d "acpi: do not use TARGET_PAGE_SIZE" changed struct
NvdimmDsmIn from a variable-size structure to a fixed-size structure of
4096 bytes. It forgot to adjust an assert in
nvdimm_dsm_set_label_data(..., NvdimmDsmIn *in, ...):
    assert(sizeof(*in) + sizeof(*set_label_data) + set_label_data->length <=
           4096);
which could crash QEMU when guest writes NVDIMM labels.

Fix it by replacing sizeof(*in) by offsetof(NvdimmDsmIn, arg3).

Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com>
Reported-by: Dan Williams <dan.j.williams@intel.com>
Tested-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2016-11-01 19:21:09 +02:00
..
9pfs
acpi acpi: fix assert failure caused by commit 35c5a52d 2016-11-01 19:21:09 +02:00
adc
alpha sun4uv: fix serial initialization regression 2016-10-24 15:27:20 +02:00
arm x86 and CPU queue, 2016-10-24 2016-10-25 10:25:27 +01:00
audio audio: intel-hda: check stream entry count during transfer 2016-10-26 14:51:44 +02:00
block virtio-blk: always use dataplane path if ioeventfd is active 2016-10-30 19:51:32 +02:00
bt char: replace avail_connections 2016-10-24 15:46:10 +02:00
char char: remove explicit_fe_open, use a set_handlers argument 2016-10-24 15:46:10 +02:00
core nvdimm acpi: introduce fit buffer 2016-11-01 19:21:09 +02:00
cpu
cris
display virtio-gpu: fix memory leak in virtio_gpu_resource_create_2d 2016-10-26 14:52:21 +02:00
dma
gpio
i2c i2c: Add asserts for second smbus i2c_start_transfer() 2016-10-24 16:48:02 +01:00
i386 pc: memhp: enable nvdimm device hotplug 2016-11-01 19:21:09 +02:00
ide macio: switch over to new byte-aligned DMA helpers 2016-10-27 16:29:13 -04:00
input adb: change handler only when recognized 2016-10-28 09:38:26 +11:00
intc pseries: Move construction of /interrupt-controller fdt node 2016-10-28 09:38:26 +11:00
ipack
ipmi ipmi: Add graceful shutdown handling to the external BMC 2016-11-01 19:21:09 +02:00
isa char: remove init callback 2016-10-24 15:27:20 +02:00
lm32
m68k
mem pc: memhp: enable nvdimm device hotplug 2016-11-01 19:21:09 +02:00
microblaze
mips char: remove explicit_fe_open, use a set_handlers argument 2016-10-24 15:46:10 +02:00
misc char: remove explicit_fe_open, use a set_handlers argument 2016-10-24 15:46:10 +02:00
moxie
net net: rtl8139: limit processing of ring descriptors 2016-10-26 09:57:59 +08:00
nvram spapr_nvram: Pre-initialize the NVRAM to support the -prom-env parameter 2016-10-28 09:38:27 +11:00
openrisc
pci
pci-bridge
pci-host
pcmcia
ppc spapr: Memory hot-unplug support 2016-10-28 11:17:35 +11:00
s390x virtio: introduce virtio_device_ioeventfd_enabled 2016-10-30 19:51:32 +02:00
scsi virtio-scsi: always use dataplane path if ioeventfd is active 2016-10-30 19:51:32 +02:00
sd
sh4
smbios
sparc nvram: Rename openbios_firmware_abi.h into sun_nvram.h 2016-10-28 09:36:58 +11:00
sparc64 nvram: Rename openbios_firmware_abi.h into sun_nvram.h 2016-10-28 09:36:58 +11:00
ssi xilinx: fix buffer overflow on realize 2016-10-24 15:27:20 +02:00
timer timer: stm32f2xx_timer: add check for prescaler value 2016-10-24 16:26:55 +01:00
tpm
tricore
unicore32
usb * KVM run_on_cpu fix (Alex) 2016-10-24 15:03:09 +01:00
vfio
virtio virtio-crypto: using bh to handle dataq's requests 2016-11-01 19:21:08 +02:00
watchdog
xen
xenpv
xtensa char: remove init callback 2016-10-24 15:27:20 +02:00
Makefile.objs