qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] tcg: assert last byte is in guest space


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH] tcg: assert last byte is in guest space
Date: Fri, 8 Feb 2019 10:12:13 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

On 2/8/19 8:37 AM, Rémi Denis-Courmont wrote:
> Rather than assert that the first byte of a checked range is within the
> guest address space, assert that the last byte is. The assertion is
> moved past the overflow check to ensure that the last byte is actually
> the one with the highest address.
> 
> Signed-off-by: Rémi Denis-Courmont <address@hidden>
> ---
>  accel/tcg/translate-all.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)

What are you trying to fix here?

You've moved the assert past some returns, so that some cases that should not
be handled by this function no longer get checked.  As the comment says, the
address should already have been filtered by h2g_valid.


r~



reply via email to

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