qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Force pread64/pwrite64 to return 0 for zero-len


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] Force pread64/pwrite64 to return 0 for zero-length buffer
Date: Wed, 17 Dec 2014 13:15:00 +0000

On 17 December 2014 at 12:56, Ilya Palachev <address@hidden> wrote:
> We were interested in pwrite64/pread64 only since it caused a failure in
> elfutils (see https://bugzilla.redhat.com/show_bug.cgi?id=1174267).
> Of course, it applies also to other syscalls. There are the following
> problems:
>
> - Find what syscalls should be changed (check POSIX specification and qemu
> implementation)

Well, we should at least fix all the read/write syscalls, so we're
consistent.

> - Whether to change them all with "if" statements as for pread64/pwrite64.
> Or there is some more convenient way?

The other possibility would be to make sure that lock_user/unlock_user
succeeded for zero length. But that would be a pain to validate because
we'd need to check that no other syscall was relying on the "zero length
fails" behaviour. So a specific check and early exit is probably easier
and better.

> - Find they how to test them all after the change is made (make check?)

"make check" doesn't really exercise linux-user. Running the ltp tests
is usually a more comprehensive test:
http://wiki.qemu.org/Testing/LTP

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]