Re: RFD: x32 ABI system call numbers

From: Arnd Bergmann
Date: Mon Sep 05 2011 - 13:23:00 EST


On Monday 05 September 2011, H.J. Lu wrote:
> I added MSG_CMSG_COMPAT64 and new compat system calls with
> 64bit timespec/val to support it. See the enclosed patch.

Yes, looks good. Maybe there should be an #ifdef in there though,
so the other compat architectures don't get the extra code.

> BTW, I also added
>
> compat_sys_preadv64(unsigned long fd, const struct compat_iovec __user *vec,
> unsigned long vlen, loff_t pos)
> compat_sys_pwritev64(unsigned long fd, const struct compat_iovec __user *vec,
> unsigned long vlen, loff_t pos)
>
> to support 32bit compat_iovec * and 64bit offset.

Does that make much of a difference? I would guess that it's just as
easy to do in libc by splitting the pos argument and calling the
existing compat_sys_preadv. Alternatively, you could make glibc
copy the iovec array to the 64 bit format and call the native syscall,
because compat_rw_copy_check_uvector() otherwise just ends up doing that
in kernel space. Or you just define the x32 libc iovec to

struct iovec {
void *iov_base;
unsigned int __pad; /* gets cleared by libc */
__u64 iov_len;
}

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/