Re: [PATCH] vfio/pci: Use defined memcpy() behavior

2020-03-11 Thread Alex Williamson
On Wed, 11 Mar 2020 10:54:12 +0800 "Longpeng (Mike, Cloud Infrastructure Service Product Dept.)" wrote: > On 2020/3/11 1:15, Alex Williamson wrote: > > vfio_rom_read() relies on memcpy() doing the logically correct thing, > > ie. safely copying zero bytes from a NULL pointer when rom_size is > >

Re: [PATCH] vfio/pci: Use defined memcpy() behavior

2020-03-10 Thread Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
On 2020/3/11 1:15, Alex Williamson wrote: > vfio_rom_read() relies on memcpy() doing the logically correct thing, > ie. safely copying zero bytes from a NULL pointer when rom_size is > zero, rather than the spec definition, which is undefined when the > source or target pointers are NULL. Resol

Re: [PATCH] vfio/pci: Use defined memcpy() behavior

2020-03-10 Thread Laszlo Ersek
On 03/10/20 18:15, Alex Williamson wrote: > vfio_rom_read() relies on memcpy() doing the logically correct thing, > ie. safely copying zero bytes from a NULL pointer when rom_size is > zero, rather than the spec definition, which is undefined when the > source or target pointers are NULL. Resolve

Re: [PATCH] vfio/pci: Use defined memcpy() behavior

2020-03-10 Thread no-reply
Patchew URL: https://patchew.org/QEMU/158386047731.30997.5580377889283866404.st...@gimli.home/ Hi, This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!

[PATCH] vfio/pci: Use defined memcpy() behavior

2020-03-10 Thread Alex Williamson
vfio_rom_read() relies on memcpy() doing the logically correct thing, ie. safely copying zero bytes from a NULL pointer when rom_size is zero, rather than the spec definition, which is undefined when the source or target pointers are NULL. Resolve this by wrapping the call in the condition express