qemu-devel
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]