qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] linux-user: fix cmsg conversion in case of mult


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] linux-user: fix cmsg conversion in case of multiple headers
Date: Tue, 1 Sep 2015 16:45:12 +0100

On 31 August 2015 at 20:27, Jonathan Neuschäfer <address@hidden> wrote:
> Currently, __target_cmsg_nxthdr compares a pointer derived from
> target_cmsg against the msg_control field of target_msgh (through
> subtraction).  This failed for me when emulating i386 code under x86_64,
> because pointers in the host address space and pointers in the guest
> address space were not the same.  This patch passes the initial value of
> target_cmsg into __target_cmsg_nxthdr.
>
> I found and fixed two more related bugs:
>  - __target_cmsg_nxthdr now returns the new cmsg pointer instead of the
>    old one.
>  - tgt_space (in host_to_target_cmsg) doesn't count "sizeof (struct
>    target_cmsghdr)" twice anymore.
>
> Signed-off-by: Jonathan Neuschäfer <address@hidden>

Code-wise this looks good; thanks. There are a few minor style
nits caught by scripts/checkpatch.pl, which it would be nice if
you can fix. (They're mostly things that were present in the code
already, but we like to fix the style issues when a patch has
to touch a line of code anyway.)

thanks
-- PMM



reply via email to

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