lkml.org 
[lkml]   [2017]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3] fs/fcntl: restore checking against COMPAT_LOFF_T_MAX for F_GETLK64
Jeff Layton писал 14.11.17 22:12:
...
> Wait...
>
> Does this do anything at all in the case where you pass in
> COMPAT_LOFF_T_MAX? l_start and l_len are either off_t or loff_t
> (depending on arch).
>
> Either one will fit in the F_GETLK64/F_OFD_GETLK struct, so I don't see
> a need to check here.
I am not sure, can off_t be bigger than loff_t ?
If not, we have just skip checking against COMPAT_LOFF_T_MAX.

...
>> @@ -644,7 +644,7 @@ COMPAT_SYSCALL_DEFINE3(fcntl64, unsigned int, fd,
>> unsigned int, cmd,
>> err = fcntl_getlk(f.file, convert_fcntl_cmd(cmd), &flock);
>> if (err)
>> break;
>> - err = fixup_compat_flock(&flock);
>> + err = fixup_compat_flock(&flock, COMPAT_LOFF_T_MAX);
>> if (err)
>> return err;
>> err = put_compat_flock64(&flock, compat_ptr(arg));
>
> Maybe a simpler fix would be to just remove the fixup_compat_flock call
> above?
>
> PS: if you send any more patches, please cc Christoph. He did the
Ok.

--
С уважением,
Виталий Липатов,
Etersoft

\
 
 \ /
  Last update: 2017-11-14 20:25    [W:0.057 / U:20.424 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site