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]
Date:   Mon, 16 Dec 2019 20:34:33 -0800
From:   Richard Cochran <richardcochran@...il.com>
To:     Jakub Kicinski <jakub.kicinski@...ronome.com>
Cc:     netdev@...r.kernel.org, David Miller <davem@...emloft.net>,
        devicetree@...r.kernel.org, Andrew Lunn <andrew@...n.ch>,
        Florian Fainelli <f.fainelli@...il.com>,
        Heiner Kallweit <hkallweit1@...il.com>,
        Jacob Keller <jacob.e.keller@...el.com>,
        Mark Rutland <mark.rutland@....com>,
        Miroslav Lichvar <mlichvar@...hat.com>,
        Murali Karicheri <m-karicheri2@...com>,
        Rob Herring <robh+dt@...nel.org>,
        Willem de Bruijn <willemb@...gle.com>,
        Wingman Kwok <w-kwok2@...com>
Subject: Re: [PATCH V6 net-next 11/11] ptp: Add a driver for InES time
 stamping IP core.

On Mon, Dec 16, 2019 at 04:11:14PM -0800, Jakub Kicinski wrote:
> On Mon, 16 Dec 2019 08:13:26 -0800, Richard Cochran wrote:
> > +	clkid = (u64 *)(data + offset + OFF_PTP_CLOCK_ID);
> > +	portn = (u16 *)(data + offset + OFF_PTP_PORT_NUM);
> > +	seqid = (u16 *)(data + offset + OFF_PTP_SEQUENCE_ID);
> 
> These should perhaps be __be types?
> 
> Looks like there is a few other sparse warnings in ptp_ines.c, would
> you mind addressing those?

I saw the sparse warnings before (from one of the robots), but I
decided that they are false positives.  Or perhaps I don't appreciate
what the warnings mean...

Take the 'clkid' pointer for example:
 
> > +	if (cpu_to_be64(ts->clkid) != *clkid) {
> > +		pr_debug("clkid mismatch ts %llx != skb %llx\n",
> > +			 cpu_to_be64(ts->clkid), *clkid);
> > +		return false;
> > +	}

The field that to which 'clkid' points is in network byte order.  The
code correctly converts ts->clkid (in CPU byte order) to network byte
order before comparing it with the field.

So where is the error?

Thanks,
Richard

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ