qemu-devel
[Top][All Lists]
Advanced

[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: Peter Maydell
Subject: Re: [Qemu-devel] [PULL v2 03/24] linux-user: Use safe_syscall wrapper for fcntl
Date: Thu, 12 Jul 2018 09:41:07 +0100

On 12 July 2018 at 08:18, Laurent Vivier <address@hidden> wrote:
> 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)?

I don't recall; I probably just missed that one. I don't
see any reason why it shouldn't be using safe_fcntl().

thanks
-- PMM



reply via email to

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