[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 1/8] hw/i386/intel_iommu: vtd_slpte_nonzero_rsvd(): assert
From: |
Peter Maydell |
Subject: |
Re: [PATCH v2 1/8] hw/i386/intel_iommu: vtd_slpte_nonzero_rsvd(): assert no overflow |
Date: |
Tue, 26 Sep 2023 21:24:53 +0100 |
On Tue, 26 Sept 2023 at 21:15, Vladimir Sementsov-Ogievskiy
<vsementsov@yandex-team.ru> wrote:
>
> We support only 3- and 4-level page-tables, which is firstly checked in
> vtd_decide_config(), then setup in vtd_init(). Than level fields are
> checked by vtd_is_level_supported().
>
> So here we can't have level out from 1..4 inclusive range. Let's assert
> it. That also explains Coverity that we are not going to overflow the
> array.
>
> CID: 1487158, 1487186
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
> ---
> hw/i386/intel_iommu.c | 23 ++++++++++++++++++++---
> 1 file changed, 20 insertions(+), 3 deletions(-)
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM
- [PATCH v2 0/8] coverity fixes, Vladimir Sementsov-Ogievskiy, 2023/09/26
- [PATCH v2 2/8] util/filemonitor-inotify: qemu_file_monitor_watch(): assert no overflow, Vladimir Sementsov-Ogievskiy, 2023/09/26
- [PATCH v2 4/8] mc146818rtc: rtc_set_time(): initialize tm to zeroes, Vladimir Sementsov-Ogievskiy, 2023/09/26
- [PATCH v2 6/8] block/nvme: nvme_process_completion() fix bound for cid, Vladimir Sementsov-Ogievskiy, 2023/09/26
- [PATCH v2 1/8] hw/i386/intel_iommu: vtd_slpte_nonzero_rsvd(): assert no overflow, Vladimir Sementsov-Ogievskiy, 2023/09/26
- Re: [PATCH v2 1/8] hw/i386/intel_iommu: vtd_slpte_nonzero_rsvd(): assert no overflow,
Peter Maydell <=
- [PATCH v2 5/8] pcie_sriov: unregister_vfs(): fix error path, Vladimir Sementsov-Ogievskiy, 2023/09/26
- [PATCH v2 8/8] io/channel-socket: qio_channel_socket_flush(): improve msg validation, Vladimir Sementsov-Ogievskiy, 2023/09/26
- [PATCH v2 7/8] hw/core/loader: gunzip(): initialize z_stream, Vladimir Sementsov-Ogievskiy, 2023/09/26
- [PATCH v2 3/8] libvhost-user.c: add assertion to vu_message_read_default, Vladimir Sementsov-Ogievskiy, 2023/09/26
- Re: [PATCH v2 0/8] coverity fixes, Maksim Davydov, 2023/09/27