lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <fd597b44-1d5b-f79f-63b9-3dcc2e58b05f@mellanox.com>
Date:   Fri, 15 Nov 2019 18:23:06 +0000
From:   Ariel Levkovich <lariel@...lanox.com>
To:     "Keller, Jacob E" <jacob.e.keller@...el.com>,
        Saeed Mahameed <saeedm@...lanox.com>,
        "richardcochran@...il.com" <richardcochran@...il.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC:     "Hall, Christopher S" <christopher.s.hall@...el.com>,
        Eugenia Emantayev <eugenia@...lanox.com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "sergei.shtylyov@...entembedded.com" 
        <sergei.shtylyov@...entembedded.com>,
        Feras Daoud <ferasda@...lanox.com>,
        "stefan.sorensen@...ctralink.com" <stefan.sorensen@...ctralink.com>,
        "brandon.streiff@...com" <brandon.streiff@...com>,
        "Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>,
        "intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
        "felipe.balbi@...ux.intel.com" <felipe.balbi@...ux.intel.com>
Subject: Re: [PATCH net 06/13] mlx5: reject unsupported external timestamp
 flags

On 11/14/19 8:15 PM, Keller, Jacob E wrote:
>> -----Original Message-----
>> From: Saeed Mahameed <saeedm@...lanox.com>
>> Sent: Thursday, November 14, 2019 4:03 PM
>> To: Ariel Levkovich <lariel@...lanox.com>; richardcochran@...il.com;
>> netdev@...r.kernel.org
>> Cc: Hall, Christopher S <christopher.s.hall@...el.com>; Eugenia Emantayev
>> <eugenia@...lanox.com>; davem@...emloft.net;
>> sergei.shtylyov@...entembedded.com; Feras Daoud <ferasda@...lanox.com>;
>> stefan.sorensen@...ctralink.com; brandon.streiff@...com; Keller, Jacob E
>> <jacob.e.keller@...el.com>; Kirsher, Jeffrey T <jeffrey.t.kirsher@...el.com>;
>> intel-wired-lan@...ts.osuosl.org; felipe.balbi@...ux.intel.com
>> Subject: Re: [PATCH net 06/13] mlx5: reject unsupported external timestamp
>> flags
>>
>> On Thu, 2019-11-14 at 10:45 -0800, Richard Cochran wrote:
>>> From: Jacob Keller <jacob.e.keller@...el.com>
>>>
>>> Fix the mlx5 core PTP support to explicitly reject any future flags
>>> that
>>> get added to the external timestamp request ioctl.
>>>
>>> In order to maintain currently functioning code, this patch accepts
>>> all
>>> three current flags. This is because the PTP_RISING_EDGE and
>>> PTP_FALLING_EDGE flags have unclear semantics and each driver seems
>>> to
>>> have interpreted them slightly differently.
>>>
>>> [ RC: I'm not 100% sure what this driver does, but if I'm not wrong
>>> it
>>>        follows the dp83640:
>>>
>> The driver will check if the PTP_FALLING_EDGE flag was set then it will
>> set it in HW, if not then it is going to default to PTP_RISING_EDGE, so
>> LGTM.
>>
>> Reviewed-by: Saeed Mahameed <saeedm@...lanox.com>
>>
>> But same story here, old tools that lazily set 0xffff or 0x0000 and
>> expected every thing to work.. again not sure if they do exist.
>>
>> Ariel please have a look at this patch.
>>
> As long as they stick to the original ioctls this won't be a problem, because the v1 ioctl now explicitly clears unsupported bits before calling driver, so this check will pass. Obviously, this change should not be backported to earlier than 5.4 without also backporting that masking in the original ioctl functions.
>
> Thanks,
> Jake
>
Agree.

Just a small suggestion, you can perform the check with simply 
PTP_EXTTS_V1_VALID_FLAGS. Italready combines all the bits we need to check.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ