lkml.org 
[lkml]   [2011]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: RFD: x32 ABI system call numbers
From
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/

\
 
 \ /
  Last update: 2011-09-05 21:37    [W:0.077 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site