Messages in this thread | | | Date | Mon, 5 Sep 2011 12:34:54 -0700 | Subject | Re: RFD: x32 ABI system call numbers | From | "H.J. Lu" <> |
| |
On Mon, Sep 5, 2011 at 10:21 AM, Arnd Bergmann <arnd@arndb.de> wrote: > 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; > } >
I need to clear __pad for every readv/writev/preadv/pwritev call even if it has been cleared before. Is compat_sys_xxx faster than this?
-- H.J. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |