qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] migration: check length directly to make sure t


From: Wei Yang
Subject: Re: [Qemu-devel] [PATCH] migration: check length directly to make sure the range is aligned
Date: Tue, 29 Oct 2019 16:21:12 +0800
User-agent: Mutt/1.9.4 (2018-02-28)

On Tue, Oct 29, 2019 at 07:04:19AM +0000, Dr. David Alan Gilbert wrote:
>* Wei Yang (address@hidden) wrote:
>> On Fri, Jul 19, 2019 at 07:06:51PM +0100, Dr. David Alan Gilbert wrote:
>> >* Paolo Bonzini (address@hidden) wrote:
>> >> On 19/07/19 19:54, Dr. David Alan Gilbert wrote:
>> >> >> -        if ((uintptr_t)host_endaddr & (rb->page_size - 1)) {
>> >> >> -            error_report("ram_block_discard_range: Unaligned end 
>> >> >> address: %p",
>> >> >> -                         host_endaddr);
>> >> >> +        if (length & (rb->page_size - 1)) {
>> >> >> +            error_report("ram_block_discard_range: Unaligned length: 
>> >> >> %lx",
>> >> >> +                         length);
>> >> > Yes, I *think* this is safe, we'll need to watch out for any warnings;
>> >> 
>> >> Do you mean compiler or QEMU warning?
>> >
>> >No, I mean lots of these error reports being printed out in some common
>> >case.
>> >
>> 
>> Hi, Dave
>> 
>> Haven't see you for a period of time :-)
>
>I'm here (although been busy with virtiofs) - but this patch is exec.c
>so I think it needs to be picked by Paolo or rth.
>

Thanks Dave

Paolo

Do you feel comfortable with this?

>Dave
>
>> >Dave
>> >
>> >  The patch is safe since there's an
>> >> 
>> >>     if ((uintptr_t)host_startaddr & (rb->page_size - 1)) {
>> >>         error_report("ram_block_discard_range: Unaligned start address: 
>> >> %p",
>> >>                      host_startaddr);
>> >>         goto err;
>> >>     }
>> >> 
>> >> just before this context.
>> >> 
>> >> Paolo
>> >--
>> >Dr. David Alan Gilbert / address@hidden / Manchester, UK
>> 
>> -- 
>> Wei Yang
>> Help you, Help me
>--
>Dr. David Alan Gilbert / address@hidden / Manchester, UK

-- 
Wei Yang
Help you, Help me



reply via email to

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