[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 4/4] linux-user: Fix fadvise64() syscall support
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 4/4] linux-user: Fix fadvise64() syscall support for Mips32 |
Date: |
Wed, 5 Oct 2016 05:38:14 -0700 |
On 5 October 2016 at 03:02, Aleksandar Markovic
<address@hidden> wrote:
> Yes, we could replace TARGET_NR_fadvise64 with TARGET_NR_fadvise64_64
> in Mips32 syscall numbers definition list, and expect the same effect.
> I just prefer to leave original symbols for syscall numbers, as they
> are defined in kernel headers, unless there is a compelling reason not
> to do it.
I see the argument, but the reason would be "you end up reimplementing
fadvise64_64 as a special case for MIPS for fadvise64, which is a chunk
of extra ugly code that really isn't necessary".
> But, there is more. Code that handles TARGET_NR_fadvise64_64 in Qemu
> utilizes host's posix_advise(). It looks to me that this is just
> plain incorrect. It won't work correctly on 32 bit hosts, with
> respect to arguments of posix_advise() that are 32-bit (while
> 64-bit value is passed to them) Instead, posix_fadvise64() should
> have been used, IMHO.
If this is broken we should fix it rather than just ignoring it for
MIPS, but I don't think it is broken -- we compile QEMU with
-DFILE_OFFSET_BITS=64, so posix_fadvise() always takes 64 bit arguments
even on 32 bit hosts.
thanks
-- PMM
[Qemu-devel] [PATCH 2/4] linux-user: Update termbits.h for Mips32, Aleksandar Markovic, 2016/10/04