diff options
| author | Jonathan Neuschäfer <j.neuschaefer@gmx.net> | 2015-09-03 07:27:26 +0200 |
|---|---|---|
| committer | Riku Voipio <riku.voipio@linaro.org> | 2015-09-28 16:39:43 +0300 |
| commit | ee1045877a7e226945c7cec2bda80039bd2d0c8e (patch) | |
| tree | 00161e36d739a5ccfb44e26d25f1708bb1ddc9ab /linux-user/signal.c | |
| parent | 59baae9a626396a3a05840279084c4bf2beb8f40 (diff) | |
| download | focaccia-qemu-ee1045877a7e226945c7cec2bda80039bd2d0c8e.tar.gz focaccia-qemu-ee1045877a7e226945c7cec2bda80039bd2d0c8e.zip | |
linux-user: fix cmsg conversion in case of multiple headers
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. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'linux-user/signal.c')
0 files changed, 0 insertions, 0 deletions