lkml.org 
[lkml]   [2020]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRE: Buggy commit tracked to: "Re: [PATCH 2/9] iov_iter: move rw_copy_check_uvector() into lib/iov_iter.c"
    Date
    From: Matthew Wilcox <willy@infradead.org>
    > Sent: 22 October 2020 17:41
    >
    > On Thu, Oct 22, 2020 at 04:35:17PM +0000, David Laight wrote:
    > > Wait...
    > > readv(2) defines:
    > > ssize_t readv(int fd, const struct iovec *iov, int iovcnt);
    >
    > It doesn't really matter what the manpage says. What does the AOSP
    > libc header say?

    The only copy I can find is:

    /usr/include/x86_64-linux-gnu/sys/uio.h:extern ssize_t readv (int __fd, const struct iovec *__iovec, int __count)
    /usr/include/x86_64-linux-gnu/sys/uio.h- __wur;

    and not surprisingly agrees.
    POSIX and/or TOG will (more or less) mandate the prototype.

    > > But the syscall is defined as:
    > >
    > > SYSCALL_DEFINE3(readv, unsigned long, fd, const struct iovec __user *, vec,
    > > unsigned long, vlen)
    > > {
    > > return do_readv(fd, vec, vlen, 0);
    > > }

    I wonder when the high bits of 'fd' get zapped?

    David

    -
    Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
    Registration No: 1397386 (Wales)

    \
     
     \ /
      Last update: 2020-10-22 18:50    [W:2.661 / U:0.060 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site