qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 12/13] hw/intc/arm_gicv3_its: Check indexes before use, n


From: Richard Henderson
Subject: Re: [PATCH v2 12/13] hw/intc/arm_gicv3_its: Check indexes before use, not after
Date: Fri, 28 Jan 2022 12:42:44 +1100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

On 1/12/22 04:10, Peter Maydell wrote:
In a few places in the ITS command handling functions, we were
doing the range-check of an event ID or device ID only after using
it as a table index; move the checks to before the uses.

This misordering wouldn't have very bad effects because the
tables are in guest memory anyway.

Signed-off-by: Peter Maydell<peter.maydell@linaro.org>
---
  hw/intc/arm_gicv3_its.c | 42 ++++++++++++++++++++++++-----------------
  1 file changed, 25 insertions(+), 17 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~



reply via email to

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