Re: [Qemu-devel] [PATCH] linux-user: don't short-circuit read with zero length

2019-03-06 Thread Laurent Vivier
On 05/03/2019 17:45, Andreas Schwab wrote: > A zero-length read still needs to do the usual checks, thus it may return > errors like EBADF. This makes the read syscall emulation consistent with > the pread64 syscall emulation. > > Signed-off-by: Andreas Schwab > --- > linux-user/syscall.c | 4 +

Re: [Qemu-devel] [PATCH] linux-user: don't short-circuit read with zero length

2019-03-05 Thread Laurent Vivier
Le 05/03/2019 à 17:45, Andreas Schwab a écrit : > A zero-length read still needs to do the usual checks, thus it may return > errors like EBADF. This makes the read syscall emulation consistent with > the pread64 syscall emulation. > > Signed-off-by: Andreas Schwab > --- > linux-user/syscall.c

[Qemu-devel] [PATCH] linux-user: don't short-circuit read with zero length

2019-03-05 Thread Andreas Schwab
A zero-length read still needs to do the usual checks, thus it may return errors like EBADF. This makes the read syscall emulation consistent with the pread64 syscall emulation. Signed-off-by: Andreas Schwab --- linux-user/syscall.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) dif

Re: [Qemu-devel] [PATCH] linux-user: don't short-circuit read with zero length

2018-09-12 Thread Richard Henderson
On 09/11/2018 05:03 AM, Andreas Schwab wrote: > +if (!(p = lock_user(VERIFY_WRITE, arg2, arg3, 0))) > +goto efault; The goto should not compile on head, after 2852aafd9d05. r~

[Qemu-devel] [PATCH] linux-user: don't short-circuit read with zero length

2018-09-11 Thread Andreas Schwab
A zero-length read still needs to do the usual checks, thus it may return errors like EBADF. Signed-off-by: Andreas Schwab --- linux-user/syscall.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 643b8833de