syscall.c (7174970a94df10ee84143edc7c94a2472d654604) | syscall.c (ad762b990fa9da53e203b934583838d4dd371e20) |
---|---|
1/* 2 * Linux syscalls 3 * 4 * Copyright (c) 2003 Fabrice Bellard 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 1678 unchanged lines hidden (view full) --- 1687 if (!target_cmsg) 1688 return -TARGET_EFAULT; 1689 1690 while (cmsg && target_cmsg) { 1691 void *data = CMSG_DATA(cmsg); 1692 void *target_data = TARGET_CMSG_DATA(target_cmsg); 1693 1694 int len = tswapal(target_cmsg->cmsg_len) | 1/* 2 * Linux syscalls 3 * 4 * Copyright (c) 2003 Fabrice Bellard 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 1678 unchanged lines hidden (view full) --- 1687 if (!target_cmsg) 1688 return -TARGET_EFAULT; 1689 1690 while (cmsg && target_cmsg) { 1691 void *data = CMSG_DATA(cmsg); 1692 void *target_data = TARGET_CMSG_DATA(target_cmsg); 1693 1694 int len = tswapal(target_cmsg->cmsg_len) |
1695 - TARGET_CMSG_ALIGN(sizeof (struct target_cmsghdr)); | 1695 - sizeof(struct target_cmsghdr); |
1696 1697 space += CMSG_SPACE(len); 1698 if (space > msgh->msg_controllen) { 1699 space -= CMSG_SPACE(len); 1700 /* This is a QEMU bug, since we allocated the payload 1701 * area ourselves (unlike overflow in host-to-target 1702 * conversion, which is just the guest giving us a buffer 1703 * that's too small). It can't happen for the payload types --- 64 unchanged lines hidden (view full) --- 1768 target_cmsg_start = target_cmsg; 1769 if (!target_cmsg) 1770 return -TARGET_EFAULT; 1771 1772 while (cmsg && target_cmsg) { 1773 void *data = CMSG_DATA(cmsg); 1774 void *target_data = TARGET_CMSG_DATA(target_cmsg); 1775 | 1696 1697 space += CMSG_SPACE(len); 1698 if (space > msgh->msg_controllen) { 1699 space -= CMSG_SPACE(len); 1700 /* This is a QEMU bug, since we allocated the payload 1701 * area ourselves (unlike overflow in host-to-target 1702 * conversion, which is just the guest giving us a buffer 1703 * that's too small). It can't happen for the payload types --- 64 unchanged lines hidden (view full) --- 1768 target_cmsg_start = target_cmsg; 1769 if (!target_cmsg) 1770 return -TARGET_EFAULT; 1771 1772 while (cmsg && target_cmsg) { 1773 void *data = CMSG_DATA(cmsg); 1774 void *target_data = TARGET_CMSG_DATA(target_cmsg); 1775 |
1776 int len = cmsg->cmsg_len - CMSG_ALIGN(sizeof (struct cmsghdr)); | 1776 int len = cmsg->cmsg_len - sizeof(struct cmsghdr); |
1777 int tgt_len, tgt_space; 1778 1779 /* We never copy a half-header but may copy half-data; 1780 * this is Linux's behaviour in put_cmsg(). Note that 1781 * truncation here is a guest problem (which we report 1782 * to the guest via the CTRUNC bit), unlike truncation 1783 * in target_to_host_cmsg, which is a QEMU bug. 1784 */ --- 10683 unchanged lines hidden --- | 1777 int tgt_len, tgt_space; 1778 1779 /* We never copy a half-header but may copy half-data; 1780 * this is Linux's behaviour in put_cmsg(). Note that 1781 * truncation here is a guest problem (which we report 1782 * to the guest via the CTRUNC bit), unlike truncation 1783 * in target_to_host_cmsg, which is a QEMU bug. 1784 */ --- 10683 unchanged lines hidden --- |