[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL v2 03/24] linux-user: Use safe_syscall wrapper fo
From: |
Laurent Vivier |
Subject: |
Re: [Qemu-devel] [PULL v2 03/24] linux-user: Use safe_syscall wrapper for fcntl |
Date: |
Thu, 12 Jul 2018 09:18:29 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 |
Le 28/06/2016 à 21:12, address@hidden a écrit :
> From: Peter Maydell <address@hidden>
>
> Use the safe_syscall wrapper for fcntl. This is straightforward now
> that we always use 'struct fcntl64' on the host, as we don't need
> to select whether to call the host's fcntl64 or fcntl syscall
> (a detail that the libc previously hid for us).
>
> Signed-off-by: Peter Maydell <address@hidden>
> Reviewed-by: Laurent Vivier <address@hidden>
> Signed-off-by: Riku Voipio <address@hidden>
> ---
> linux-user/syscall.c | 34 +++++++++++++++++++++++-----------
> 1 file changed, 23 insertions(+), 11 deletions(-)
...
> @@ -10252,7 +10264,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long
> arg1,
> if (ret) {
> break;
> }
> - ret = get_errno(fcntl(arg1, cmd, &fl));
> + ret = get_errno(safe_fcntl(arg1, cmd, &fl));
> break;
> default:
> ret = do_fcntl(arg1, arg2, arg3);
>
Peter,
435da5e709 linux-user: Use safe_syscall wrapper for fcntl
do you remember why you only convert to safe_fcntl() the
TARGET_F_SETLK64 and TARGET_F_SETLKW64 cases and not the
TARGET_F_GETLK64 one (in TARGET_NR_fcntl64)?
Thanks,
Laurent
- Re: [Qemu-devel] [PULL v2 03/24] linux-user: Use safe_syscall wrapper for fcntl,
Laurent Vivier <=