qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 24/26] tcg: Allocate a guard page after code_


From: Aurelien Jarno
Subject: Re: [Qemu-devel] [PATCH v4 24/26] tcg: Allocate a guard page after code_gen_buffer
Date: Wed, 30 Sep 2015 18:33:55 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

On 2015-09-30 15:09, Richard Henderson wrote:
> This will catch any overflow of the buffer.
> 
> Add a native win32 alternative for alloc_code_gen_buffer;
> remove the malloc alternative.
> 
> Signed-off-by: Richard Henderson <address@hidden>
> ---
>  translate-all.c | 210 
> ++++++++++++++++++++++++++++++++------------------------
>  1 file changed, 119 insertions(+), 91 deletions(-)

I havent reviewed the patch in details, but I wonder if that could really
happen? Given the size of the code generation buffer (a few MB at
least), I don't think it's a problem if we don't use it to the last kB,
and thus we could keep some safe margin if needed.

Also what happens if an overflow really happens? In softmmu mode a
segmentation fault will happen. In user-mode I guess the fault will
be forwarded to the guest process, so this will likely wrongly
be interpreted as a bug in the guest code.

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
address@hidden                 http://www.aurel32.net



reply via email to

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