[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] linux-user: fix preadv/pwritev offsets
From: |
Max Filippov |
Subject: |
Re: [Qemu-devel] [PATCH v2] linux-user: fix preadv/pwritev offsets |
Date: |
Thu, 5 Apr 2018 06:09:37 -0700 |
On Thu, Apr 5, 2018 at 2:03 AM, Laurent Vivier <address@hidden> wrote:
> Did you try to use the regpairs_aligned() and target_offset64()
> functions as it is done for pread64(), pwrite64(), fadvise64(),... ?
My understanding is that if the syscalls had single parameter that took
two registers then it'd be a place to use regpairs_aligned. By the syscalls
are defined as follows:
SYSCALL_DEFINE5(preadv, unsigned long, fd, const struct iovec __user *, vec,
unsigned long, vlen, unsigned long, pos_l, unsigned long, pos_h)
SYSCALL_DEFINE5(pwritev, unsigned long, fd, const struct iovec __user *, vec,
unsigned long, vlen, unsigned long, pos_l, unsigned long, pos_h)
so these are normal unsigned long arguments, low part, then the high part.
target_offset64 treats arguments differently depending on the target
endianness, which is not needed for preadv/pwritev.
--
Thanks.
-- Max