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] [thread-next>] [day] [month] [year] [list]
Message-ID: <96c57989-49bc-a0e7-2dae-e19e23be64b7@ti.com>
Date:   Wed, 5 Aug 2020 21:52:48 +0300
From:   Grygorii Strashko <grygorii.strashko@...com>
To:     Florian Fainelli <f.fainelli@...il.com>,
        Kurt Kanzenbach <kurt@...utronix.de>,
        Richard Cochran <richardcochran@...il.com>
CC:     Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Jiri Pirko <jiri@...lanox.com>,
        Ido Schimmel <idosch@...lanox.com>,
        Heiner Kallweit <hkallweit1@...il.com>,
        Russell King <linux@...linux.org.uk>,
        Ivan Khoronzhuk <ivan.khoronzhuk@...aro.org>,
        Samuel Zou <zou_wei@...wei.com>, <netdev@...r.kernel.org>,
        Petr Machata <petrm@...lanox.com>
Subject: Re: [PATCH v3 6/9] ethernet: ti: cpts: Use generic helper function



On 02/08/2020 23:22, Florian Fainelli wrote:
> 
> 
> On 7/30/2020 1:00 AM, Kurt Kanzenbach wrote:
>> In order to reduce code duplication between ptp drivers, generic helper
>> functions were introduced. Use them.
>>
>> Signed-off-by: Kurt Kanzenbach <kurt@...utronix.de>
>> ---
> [snip]
>> -	if (unlikely(ptp_class & PTP_CLASS_V1))
>> -		msgtype = data + offset + OFF_PTP_CONTROL;
>> -	else
>> -		msgtype = data + offset;
>> +	msgtype = ptp_get_msgtype(hdr, ptp_class);
>> +	seqid	= be16_to_cpu(hdr->sequence_id);
> 
> Same comment as patch 5 would probably apply here as well, with using
> ntohs():
> 
> Reviewed-by: Florian Fainelli <f.fainelli@...il.com>


As reported in [1] this patch as is broke cpts and below diff on top restore it

[1] https://lore.kernel.org/netdev/20200805152503.GB9122@hoboy/T/#mcf2bd0322805e6706ee9fe4f10805e657fd0103e

-- 
Best regards,
grygorii

---------------
--- a/drivers/net/ethernet/ti/cpts.c
+++ b/drivers/net/ethernet/ti/cpts.c
@@ -509,6 +509,11 @@ void cpts_rx_timestamp(struct cpts *cpts, struct sk_buff *skb)
         int ret;
         u64 ns;
  
+       /* cpts_rx_timestamp() is called before eth_type_trans(), so
+        * skb MAC Hdr properties are not configured yet. Hence need to
+        * rest skb MAC header here
+        */
+       skb_reset_mac_header(skb);
         ret = cpts_skb_get_mtype_seqid(skb, &skb_cb->skb_mtype_seqid);
         if (!ret)
                 return;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ