[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v13 03/13] pcie: modify the capability size asse
From: |
Michael S. Tsirkin |
Subject: |
Re: [Qemu-devel] [PATCH v13 03/13] pcie: modify the capability size assert |
Date: |
Wed, 11 Nov 2015 18:55:33 +0200 |
On Wed, Nov 11, 2015 at 06:34:21PM +0800, Cao jin wrote:
> From: Chen Fan <address@hidden>
>
> Device's Offset and size can reach PCIE_CONFIG_SPACE_SIZE,
> fix the corresponding assert.
>
> Signed-off-by: Chen Fan <address@hidden>
> Reviewed-by: Marcel Apfelbaum <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
> ---
> hw/pci/pcie.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c
> index 0eab29d..8f4c0e5 100644
> --- a/hw/pci/pcie.c
> +++ b/hw/pci/pcie.c
> @@ -607,7 +607,7 @@ void pcie_add_capability(PCIDevice *dev,
>
> assert(offset >= PCI_CONFIG_SPACE_SIZE);
> assert(offset < offset + size);
> - assert(offset + size < PCIE_CONFIG_SPACE_SIZE);
> + assert(offset + size <= PCIE_CONFIG_SPACE_SIZE);
> assert(size >= 8);
> assert(pci_is_express(dev));
>
> --
> 1.9.3
- [Qemu-devel] [PATCH v13 00/13] vfio-pci: pass the aer error to guest, Cao jin, 2015/11/11
- [Qemu-devel] [PATCH v13 02/13] vfio: squeeze out vfio_pci_do_hot_reset for support bus reset, Cao jin, 2015/11/11
- [Qemu-devel] [PATCH v13 01/13] vfio: extract vfio_get_hot_reset_info as a single function, Cao jin, 2015/11/11
- [Qemu-devel] [PATCH v13 03/13] pcie: modify the capability size assert, Cao jin, 2015/11/11
- Re: [Qemu-devel] [PATCH v13 03/13] pcie: modify the capability size assert,
Michael S. Tsirkin <=
- [Qemu-devel] [PATCH v13 04/13] vfio: make the 4 bytes aligned for capability size, Cao jin, 2015/11/11
- [Qemu-devel] [PATCH v13 06/13] aer: impove pcie_aer_init to support vfio device, Cao jin, 2015/11/11
- [Qemu-devel] [PATCH v13 07/13] vfio: add aer support for vfio device, Cao jin, 2015/11/11
- [Qemu-devel] [PATCH v13 05/13] vfio: add pcie extanded capability support, Cao jin, 2015/11/11
- [Qemu-devel] [PATCH v13 10/13] pci: add pci device pre-post reset callbacks for host bus reset, Cao jin, 2015/11/11