compat_cmsghdr
((void __user *)((char __user *)(cmsg) + sizeof(struct compat_cmsghdr)))
(sizeof(struct compat_cmsghdr) + CMSG_COMPAT_ALIGN(len))
(sizeof(struct compat_cmsghdr) + (len))
(((msg)->msg_controllen) >= sizeof(struct compat_cmsghdr) ? \
(struct compat_cmsghdr __user *)((msg)->msg_control_user) : \
(struct compat_cmsghdr __user *)NULL)
((ucmlen) >= sizeof(struct compat_cmsghdr) && \
static inline struct compat_cmsghdr __user *cmsg_compat_nxthdr(struct msghdr *msg,
struct compat_cmsghdr __user *cmsg, int cmsg_len)
return (struct compat_cmsghdr __user *)ptr;
struct compat_cmsghdr __user *ucmsg;
BUILD_BUG_ON(sizeof(struct compat_cmsghdr) !=
CMSG_COMPAT_ALIGN(sizeof(struct compat_cmsghdr)));
struct compat_cmsghdr cmsg;
struct compat_cmsghdr __user *cm = (struct compat_cmsghdr __user *) kmsg->msg_control_user;
struct compat_cmsghdr cmhdr;
if (copy_to_user(CMSG_COMPAT_DATA(cm), data, cmlen - sizeof(struct compat_cmsghdr)))
if (msg->msg_controllen <= sizeof(struct compat_cmsghdr))
return (msg->msg_controllen - sizeof(struct compat_cmsghdr)) / sizeof(int);
struct compat_cmsghdr __user *cm =
(struct compat_cmsghdr __user *)msg->msg_control_user;
len = sizeof(struct compat_cmsghdr) + sizeof(int);