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]
Date:   Tue, 7 Apr 2020 00:14:07 +0300
From:   Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:     Julia Lawall <julia.lawall@...ia.fr>, horms+renesas@...ge.net.au,
        tho.vu.wh@....renesas.com, uli+renesas@...nd.eu
Cc:     netdev@...r.kernel.org, linux-renesas-soc@...r.kernel.org,
        linux-kernel@...r.kernel.org, joe@...ches.com
Subject: Re: question about drivers/net/ethernet/renesas/ravb_main.c

Hello!

On 04/03/2020 05:04 PM, Julia Lawall wrote:

> In the function ravb_hwtstamp_get in ravb_main.c, the following code looks
> suspicious:
> 
>         if (priv->tstamp_rx_ctrl & RAVB_RXTSTAMP_TYPE_V2_L2_EVENT)
>                 config.rx_filter = HWTSTAMP_FILTER_PTP_V2_L2_EVENT;
>         else if (priv->tstamp_rx_ctrl & RAVB_RXTSTAMP_TYPE_ALL)
>                 config.rx_filter = HWTSTAMP_FILTER_ALL;
>         else
>                 config.rx_filter = HWTSTAMP_FILTER_NONE;
> 
> According to drivers/net/ethernet/renesas/ravb.h,
> RAVB_RXTSTAMP_TYPE_V2_L2_EVENT is 0x00000002 and RAVB_RXTSTAMP_TYPE_ALL is
> 0x00000006.  Therefore, if the test on RAVB_RXTSTAMP_TYPE_ALL should be
> true, it will never be reached.  How should the code be changed?

   After looking at the code, I think that setting RAVB_RXTSTAMP_TYPE_ALL to
0x00000004 should be enough. BTW, the RAVB_{R,T}XTSTAMP_VALID don't seem be
used anywhere...

> thanks,
> julia

MBR, Sergei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ